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
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2040.43 ▼2.05
Dashboard /wp-admin3.88 ▲0.5866.67 ▲16.03
Posts /wp-admin/edit.php3.91 ▲0.5555.33 ▲6.35
Add New Post /wp-admin/post-new.php6.32 ▲0.44103.15 ▲1.82
Media Library /wp-admin/upload.php3.75 ▲0.5244.37 ▲5.57
Woostify Sites Library /wp-admin/themes.php?page=woostify-sites3.6633.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
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,035 ▲1,27414.43 ▼0.151.79 ▼0.1539.25 ▼4.08
Dashboard /wp-admin3,416 ▲1,2395.59 ▼0.0992.36 ▲0.9641.78 ▼0.27
Posts /wp-admin/edit.php3,335 ▲1,2352.01 ▼0.0435.22 ▼0.2732.97 ▼5.04
Add New Post /wp-admin/post-new.php2,752 ▲1,20723.38 ▼0.02689.67 ▲18.3173.01 ▲11.43
Media Library /wp-admin/upload.php2,619 ▲1,2164.23 ▲0.00104.92 ▲0.0444.85 ▼5.21
Woostify Sites Library /wp-admin/themes.php?page=woostify-sites1,6391.9028.8524.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:
LanguageFilesBlank linesComment linesLines of code
XML255,2553,360371,044
PHP1494,8209,86221,198
CSS81,20775,579
SVG41665,529
Sass27429702,383
JavaScript5206531,119
JSON830761
Markdown52050627

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 code0.39
Average class complexity17.66
▷ Minimum class complexity1.00
▷ Maximum class complexity290.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces16
Interfaces9
Traits4
Classes131
▷ Abstract classes75.34%
▷ Concrete classes12494.66%
▷ Final classes10.81%
Methods1,135
▷ Static methods766.70%
▷ Public methods77167.93%
▷ Protected methods23620.79%
▷ Private methods12811.28%
Functions42
▷ Named functions2150.00%
▷ Anonymous functions2150.00%
Constants65
▷ Global constants69.23%
▷ Class constants5990.77%
▷ Public constants59100.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
FileSize - originalSize - compressedSavings
assets/images/logo-icon.png3.79KB1.37KB▼ 64.02%
(invalid) demos/demo-17/demo-17.png270.61KB0.00KB▼ 100.00%
demos/demo-23/demo-23.png1,217.02KB1,323.43KB0.00%
demos/demo-19/demo-19.png1,996.42KB798.06KB▼ 60.03%
(invalid) demos/demo-13/demo-13.png163.20KB0.00KB▼ 100.00%