77% woostify-sites-library

Code Review | Woostify Sites Library

WordPress plugin Woostify Sites Library scored77%from 54 tests.

About plugin

  • Plugin page: woostify-sites-li...
  • Plugin version: 1.4.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0
  • WordPress version: 6.3.1
  • First release: Jan 21, 2019
  • Latest release: Aug 15, 2023
  • Number of updates: 76
  • Update frequency: every 22.0 days
  • Top authors: duongancol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active /153,652 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.43MB] [CPU: ▲2.92ms] Passed 4 tests

An overview of server-side resources used by Woostify Sites Library
Normal server usage
Page Memory (MB) CPU Time (ms)
Home / 3.66 ▲0.20 40.43 ▼2.05
Dashboard /wp-admin 3.88 ▲0.58 66.67 ▲16.03
Posts /wp-admin/edit.php 3.91 ▲0.55 55.33 ▲6.35
Add New Post /wp-admin/post-new.php 6.32 ▲0.44 103.15 ▲1.82
Media Library /wp-admin/upload.php 3.75 ▲0.52 44.37 ▲5.57
Woostify Sites Library /wp-admin/themes.php?page=woostify-sites 3.66 33.96

Server storage [IO: ▲105.29MB] [DB: ▲0.07MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • Filesystem usage must be lower than 25MB (currently using 105.29MB)
Filesystem: 672 new files
Database: no new tables, 8 new options
New WordPress options
elementor_disable_color_schemes
widget_recent-posts
elementor_disable_typography_schemes
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Woostify Sites Library
This plugin has a minimal impact on browser resources
Page Nodes Memory (MB) Script (ms) Layout (ms)
Home / 4,035 ▲1,274 14.43 ▼0.15 1.79 ▼0.15 39.25 ▼4.08
Dashboard /wp-admin 3,416 ▲1,239 5.59 ▼0.09 92.36 ▲0.96 41.78 ▼0.27
Posts /wp-admin/edit.php 3,335 ▲1,235 2.01 ▼0.04 35.22 ▼0.27 32.97 ▼5.04
Add New Post /wp-admin/post-new.php 2,752 ▲1,207 23.38 ▼0.02 689.67 ▲18.31 73.01 ▲11.43
Media Library /wp-admin/upload.php 2,619 ▲1,216 4.23 ▲0.00 104.92 ▲0.04 44.85 ▼5.21
Woostify Sites Library /wp-admin/themes.php?page=woostify-sites 1,639 1.90 28.85 24.71

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-comments
    • elementor_disable_color_schemes
    • theysaidso_admin_options
    • db_upgraded
    • elementor_disable_typography_schemes
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/woostify-sites-library/assets/images/spinner.php
  • 97× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/woostify-sites-library/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woostify-sites-library/includes/class-woostify-sites-elementor.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/woostify-sites-library/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\GroupHandler' not found in wp-content/plugins/woostify-sites-library/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woostify-sites-library/demos/demos.php:886
    • > PHP Fatal error
      require_once(): Failed opening required 'WOOSTIFY_SITES_DIRincludes/class-tgm-plugin-activation.php' (include_path='.:/usr/share/php') in wp-content/plugins/woostify-sites-library/includes/tgm-plugin-activation.php on line 34
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\MailHandler' not found in wp-content/plugins/woostify-sites-library/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/woostify-sites-library/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/woostify-sites-library/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/woostify-sites-library/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: one click import, demo, theme demos

woostify-sites-library/woostify-sites.php 92% from 13 tests

The entry point to "Woostify Sites Library" version 1.4.6 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woostify-sites-library.php" instead of "woostify-sites.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected408,240 lines of code in 231 files:
Language Files Blank lines Comment lines Lines of code
XML 25 5,255 3,360 371,044
PHP 149 4,820 9,862 21,198
CSS 8 1,207 7 5,579
SVG 4 16 6 5,529
Sass 27 429 70 2,383
JavaScript 5 206 53 1,119
JSON 8 3 0 761
Markdown 5 205 0 627

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code 0.39
Average class complexity 17.66
▷ Minimum class complexity 1.00
▷ Maximum class complexity 290.00
Average method complexity 3.18
▷ Minimum method complexity 1.00
▷ Maximum method complexity 34.00
Code structure
Namespaces 16
Interfaces 9
Traits 4
Classes 131
▷ Abstract classes 7 5.34%
▷ Concrete classes 124 94.66%
▷ Final classes 1 0.81%
Methods 1,135
▷ Static methods 76 6.70%
▷ Public methods 771 67.93%
▷ Protected methods 236 20.79%
▷ Private methods 128 11.28%
Functions 42
▷ Named functions 21 50.00%
▷ Anonymous functions 21 50.00%
Constants 65
▷ Global constants 6 9.23%
▷ Class constants 59 90.77%
▷ Public constants 59 100.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
23 PNG files occupy 16.52MB with 10.71MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
File Size - original Size - compressed Savings
assets/images/logo-icon.png 3.79KB 1.37KB ▼ 64.02%
(invalid) demos/demo-17/demo-17.png 270.61KB 0.00KB ▼ 100.00%
demos/demo-23/demo-23.png 1,217.02KB 1,323.43KB 0.00%
demos/demo-19/demo-19.png 1,996.42KB 798.06KB ▼ 60.03%
(invalid) demos/demo-13/demo-13.png 163.20KB 0.00KB ▼ 100.00%