10% dev-toolbox

Code Review | Dev Toolbox

WordPress plugin Dev Toolbox scored10%from 54 tests.

About plugin

  • Plugin page: dev-toolbox
  • Plugin version: %s by %s', 'SL_frame...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 6.3.1
  • First release: Jan 28, 2013
  • Latest release: Apr 17, 2016
  • Number of updates: 53
  • Update frequency: every 22.2 days
  • Top authors: sedLex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,315 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/dev-toolbox/core.class.php+1698
    Methods with the same name as their class will not be constructors in a future version of PHP; coreSLframework has a deprecated constructor

Server metrics [RAM: ▼0.64MB] [CPU: ▼52.46ms] Passed 4 tests

Analyzing server-side resources used by Dev Toolbox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.35 ▼0.119.17 ▼30.87
Dashboard /wp-admin3.37 ▲0.0713.52 ▼40.21
Posts /wp-admin/edit.php3.37 ▲0.0112.20 ▼33.24
Add New Post /wp-admin/post-new.php3.37 ▼2.5210.35 ▼105.52
Media Library /wp-admin/upload.php3.37 ▲0.1412.36 ▼21.75

Server storage [IO: ▲2.13MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please try to fix the following items
  • The plugin illegally modified 2 files (0.00KB) outside of "wp-content/plugins/dev-toolbox/" and "wp-content/uploads/"
    • (new file) wp-content/sedlex/inline_scripts/.empty
    • (new file) wp-content/sedlex/inline_styles/.empty
Filesystem: 173 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
widget_recent-posts
coreSLframework_options
plugin_error_on_activation
dev_toolbox_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Dev Toolbox
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲20214.20 ▼0.511.85 ▲0.1031.40 ▼12.17
Dashboard /wp-admin2,262 ▲855.61 ▲0.0298.17 ▼8.2945.99 ▼0.70
Posts /wp-admin/edit.php2,164 ▲641.99 ▼0.0236.42 ▼3.3038.73 ▲5.67
Add New Post /wp-admin/post-new.php1,433 ▼9320.85 ▼2.32610.86 ▼53.5537.15 ▼11.07
Media Library /wp-admin/upload.php1,461 ▲584.18 ▼0.08100.58 ▲3.7141.75 ▲0.15
About... /wp-admin/sedlex.php260.410.0710.48
Dev Toolbox /wp-admin/sedlex.php?page=dev-toolbox/dev-toolbox.php260.410.076.01

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
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/dev-toolbox/core.class.php+1698
    Methods with the same name as their class will not be constructors in a future version of PHP; coreSLframework has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 8 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • coreSLframework_options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • plugin_error_on_activation

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/dev-toolbox/dev-toolbox.php
    • > /wp-content/plugins/dev-toolbox/core.php
    • > /wp-content/plugins/dev-toolbox/core.class.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'core.php' (include_path='.:/usr/share/php') in wp-content/plugins/dev-toolbox/core/templates/my-plugin.php on line 18
    • > PHP Warning
      require_once(core.php): failed to open stream: No such file or directory in wp-content/plugins/dev-toolbox/core/templates/my-plugin.php on line 18

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/sedlex.php
    • > Network (severe)
    wp-admin/sedlex.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/sedlex.php?page=dev-toolbox/dev-toolbox.php
    • > Network (severe)
    wp-admin/sedlex.php?page=dev-toolbox/dev-toolbox.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Synthesis of the plugin and interface to the SVN tools), #2 (Create a new plugin (download a zip)), #3 (SVN diff tools), #4 (SVN client)
You can look at the official readme.txt

dev-toolbox/core.class.php 85% from 13 tests

"Dev Toolbox" version %s by %s', 'SL_frame...'s primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "%s by %s', 'SL_frame...")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dev-toolbox.php" instead of "core.class.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected20,653 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
PHP231,5522,50410,117
PO File323,98608,666
JavaScript62943521,236
CSS118913519
Markdown120084
JSON10029
INI2002

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 119)
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity64.96
▷ Minimum class complexity1.00
▷ Maximum class complexity362.00
Average method complexity7.51
▷ Minimum method complexity1.00
▷ Maximum method complexity119.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes14.35%
▷ Concrete classes2295.65%
▷ Final classes00.00%
Methods226
▷ Static methods4720.80%
▷ Public methods22097.35%
▷ Protected methods31.33%
▷ Private methods31.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
45 PNG files occupy 0.71MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/img/flags_sprite.png30.37KB15.11KB▼ 50.23%
img/files_and_folders.png45.43KB29.00KB▼ 36.18%
core/img/close_popup.png3.35KB0.82KB▼ 75.50%
core/img/error.png4.24KB1.48KB▼ 65.18%
core/img/tree_lastnode_minus.png0.14KB0.12KB▼ 13.89%