68% pxl-tools

Code Review | Pxl Tools

WordPress plugin Pxl Tools scored68%from 54 tests.

About plugin

  • Plugin page: pxl-tools
  • Plugin version: 1.1.25
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9.1-5.9.1
  • WordPress version: 6.3.1
  • First release: Sep 29, 2021
  • Latest release: May 13, 2022
  • Number of updates: 19
  • Update frequency: every 12.0 days
  • Top authors: communicatti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,075 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.22MB] [CPU: ▼4.67ms] Passed 4 tests

A check of server-side resources used by Pxl Tools
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2638.65 ▲4.46
Dashboard /wp-admin3.56 ▲0.2647.32 ▼1.68
Posts /wp-admin/edit.php3.61 ▲0.2547.14 ▲4.81
Add New Post /wp-admin/post-new.php6.08 ▲0.1982.04 ▼22.57
Media Library /wp-admin/upload.php3.42 ▲0.1936.64 ▲1.11

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 1,639 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
pxl_custom_core
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Pxl Tools
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.32 ▼1.301.69 ▼0.0339.98 ▲2.04
Dashboard /wp-admin2,206 ▲215.91 ▲1.03102.30 ▼0.8440.12 ▼3.24
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0233.94 ▼7.5432.78 ▼2.84
Add New Post /wp-admin/post-new.php1,514 ▼517.42 ▼5.59679.64 ▲36.0562.34 ▲8.45
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0192.90 ▼18.8143.86 ▼3.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 10× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pxl-tools/vendor/duncan3dc/blade/travis/laravel.php
    • > /wp-content/plugins/pxl-tools/helpers/Post.php
    • > /wp-content/plugins/pxl-tools/vendor/symfony/translation/Resources/bin/translation-status.php
    • > /wp-content/plugins/pxl-tools/helpers/Recaptcha.php
    • > /wp-content/plugins/pxl-tools/pxl-tools.php
    • > /wp-content/plugins/pxl-tools/helpers/Blade.php
    • > /wp-content/plugins/pxl-tools/helpers/Youtube.php
    • > /wp-content/plugins/pxl-tools/helpers/Theme.php
    • > /wp-content/plugins/pxl-tools/index.php
    • > /wp-content/plugins/pxl-tools/helpers/WhatsApp.php
  • 255× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pxl-tools/bootstrap.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Doctrine\\Inflector\\WordInflector' not found in wp-content/plugins/pxl-tools/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Transformations.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Writer\\TranslationWriterInterface' not found in wp-content/plugins/pxl-tools/vendor/symfony/translation/Writer/TranslationWriter.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\SimpleCache\\CacheInterface' not found in wp-content/plugins/pxl-tools/vendor/illuminate/contracts/Cache/Repository.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/pxl-tools/vendor/illuminate/support/Facades/URL.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/pxl-tools/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/pxl-tools/vendor/illuminate/support/Facades/Date.php:88
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Formatter\\IntlFormatterInterface' not found in wp-content/plugins/pxl-tools/vendor/symfony/translation/Formatter/IntlFormatter.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\BadMethodCallException' not found in wp-content/plugins/pxl-tools/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\\View\\Engine' not found in wp-content/plugins/pxl-tools/vendor/illuminate/view/Engines/FileEngine.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: helpers

pxl-tools/pxl-tools.php Passed 13 tests

"Pxl Tools" version 1.1.25's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
36 characters long description:
A Toolbelt for Wordpress development

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
These items require your attention
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/pxl-tools/vendor/nesbot/carbon/bin/carbon.bat
61,156 lines of code in 1,405 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,35311,16740,89154,876
XSD392482,803
JSON22002,191
Markdown2257211,186
reStructuredText1747874
XML15012
Dockerfile1319
DOS Batch1004
HTML1001

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 138)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.04
▷ Minimum class complexity1.00
▷ Maximum class complexity298.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity138.00
Code structure
Namespaces90
Interfaces132
Traits54
Classes304
▷ Abstract classes154.93%
▷ Concrete classes28995.07%
▷ Final classes3712.80%
Methods3,733
▷ Static methods66217.73%
▷ Public methods3,14084.11%
▷ Protected methods47012.59%
▷ Private methods1233.29%
Functions548
▷ Named functions10819.71%
▷ Anonymous functions44080.29%
Constants200
▷ Global constants63.00%
▷ Class constants19497.00%
▷ Public constants19097.94%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected