62% addon-library

Code Review | Addon Library

WordPress plugin Addon Library scored 62% from 54 tests.

About plugin

  • Plugin page: addon-library
  • Plugin version: 1.3.76
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4
  • WordPress version: 6.3.1
  • First release: Dec 26, 2016
  • Latest release: Jun 25, 2020
  • Number of updates: 65
  • Update frequency: every 19.5 days
  • Top authors: unitecms (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 47,907 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.46MB] [CPU: ▲1.25ms] Passed 4 tests

An overview of server-side resources used by Addon Library
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3744.05 ▼1.38
Dashboard /wp-admin3.80 ▲0.5058.90 ▲1.70
Posts /wp-admin/edit.php3.85 ▲0.4974.84 ▲20.41
Add New Post /wp-admin/post-new.php6.36 ▲0.48107.49 ▲10.07
Media Library /wp-admin/upload.php3.73 ▲0.5039.77 ▼5.39
Addons for Visual Composer /wp-admin/admin.php?page=unitecreator3.7547.12
General Settings /wp-admin/admin.php?page=unitecreator_settings3.7953.37

Server storage [IO: ▲5.82MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 744 new files
Database: 2 new tables, 7 new options
New tables
wp_addonlibrary_categories
wp_addonlibrary_addons
New WordPress options
untecreator_state
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Addon Library
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲5214.47 ▼0.151.68 ▼0.1346.28 ▼3.42
Dashboard /wp-admin2,243 ▲375.09 ▲0.26104.74 ▲0.3975.98 ▲37.57
Posts /wp-admin/edit.php2,145 ▲532.28 ▲0.2539.38 ▼3.8337.47 ▲0.86
Add New Post /wp-admin/post-new.php1,584 ▲6524.21 ▲1.00786.65 ▲94.5747.93 ▼17.60
Media Library /wp-admin/upload.php1,440 ▲554.36 ▲0.17111.35 ▼6.6886.58 ▲33.59
Addons for Visual Composer /wp-admin/admin.php?page=unitecreator1,8133.8371.18101.58
General Settings /wp-admin/admin.php?page=unitecreator_settings1,7624.0059.2056.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_addonlibrary_addons
    • wp_addonlibrary_categories
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • untecreator_state
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=unitecreator
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/addon-library/inc_php/unitecreator_addons.class.php+431
    implode(): Passing glue string after array is deprecated. Swap the parameters

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
Please fix the following items
  • 99× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/addon-library/provider/functions_wordpress.class.php
    • > /wp-content/plugins/addon-library/views/mediaselect.php
    • > /wp-content/plugins/addon-library/views/master_view.php
    • > /wp-content/plugins/addon-library/inc_php/unitecreator_output.class.php
    • > /wp-content/plugins/addon-library/provider/provider_dialog_param.class.php
    • > /wp-content/plugins/addon-library/inc_php/manager/unitecreator_manager_addons.class.php
    • > /wp-content/plugins/addon-library/inc_php/layouts/unitecreator_layout_output.class.php
    • > /wp-content/plugins/addon-library/inc_php/unitecreator_web_library.class.php
    • > /wp-content/plugins/addon-library/inc_php/framework/elements_base.class.php
    • > /wp-content/plugins/addon-library/provider/provider_globals.class.php
  • 178× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Profiler\\Dumper\\BaseDumper' not found in wp-content/plugins/addon-library/vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Unary\\AbstractUnary' not found in wp-content/plugins/addon-library/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/addon-library/vendor/twig/twig/src/Node/ForLoopNode.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_TemplateInterface' not found in wp-content/plugins/addon-library/vendor/twig/twig/src/Template.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/addon-library/vendor/twig/twig/src/Node/BodyNode.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/addon-library/vendor/twig/twig/src/Node/Expression/GetAttrExpression.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Filter' not found in wp-content/plugins/addon-library/vendor/twig/twig/lib/Twig/Filter/Method.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/addon-library/vendor/twig/twig/src/Node/ModuleNode.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/addon-library/vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/addon-library/vendor/twig/twig/src/Node/Expression/AbstractExpression.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === addon-library === )
Please take inspiration from this readme.txt

addon-library/addonlibrary.php 92% from 13 tests

The main PHP script in "Addon Library" version 1.3.76 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("addon-library.php" instead of "addonlibrary.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected84,801 lines of code in 628 files:
LanguageFilesBlank linesComment linesLines of code
PHP52315,67811,95135,191
JavaScript529,8546,71930,919
CSS271,38032513,225
SVG2003,356
HTML91151725
Markdown31450645
XML91210573
JSON300167

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity9.85
▷ Minimum class complexity1.00
▷ Maximum class complexity217.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces24
Interfaces26
Traits0
Classes465
▷ Abstract classes143.01%
▷ Concrete classes45196.99%
▷ Final classes40.89%
Methods2,646
▷ Static methods48318.25%
▷ Public methods1,77166.93%
▷ Protected methods35513.42%
▷ Private methods52019.65%
Functions78
▷ Named functions7292.31%
▷ Anonymous functions67.69%
Constants353
▷ Global constants51.42%
▷ Class constants34898.58%
▷ Public constants348100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
80 PNG files occupy 0.12MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon_settings16.png0.34KB0.41KB0.00%
images/icon-preview.png1.33KB0.35KB▼ 73.93%
images/icon_script.png0.84KB1.01KB0.00%
css/jui/new/images/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%
images/timerdot.png0.75KB0.50KB▼ 33.81%