79% wpdevtool

Code Review | WpDevTool

WordPress plugin WpDevTool scored79%from 54 tests.

About plugin

  • Plugin page: wpdevtool
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Jan 15, 2013
  • Latest release: Mar 4, 2013
  • Number of updates: 25
  • Update frequency: every 1.9 days
  • Top authors: micc83 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,215 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼10.56ms] Passed 4 tests

An overview of server-side resources used by WpDevTool
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2241.40 ▲0.39
Dashboard /wp-admin3.41 ▲0.1134.62 ▼14.23
Posts /wp-admin/edit.php3.47 ▲0.1237.85 ▼9.03
Add New Post /wp-admin/post-new.php5.66 ▼0.2368.64 ▼19.36
Media Library /wp-admin/upload.php3.42 ▲0.1935.39 ▲2.01
WpDevTool /wp-admin/admin.php?page=wpdevtool_admin3.3932.22
Crons Table /wp-admin/admin.php?page=wpdevtool_crons3.3932.40
Permalinks /wp-admin/admin.php?page=wpdevtool_permalinks3.3929.83

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
wpdevtool_maintenance_message
wpdevtool_redirect_email
wpdevtool_version
widget_recent-posts

Browser metrics Passed 4 tests

WpDevTool: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.08 ▼0.471.88 ▲0.3343.78 ▲4.64
Dashboard /wp-admin2,210 ▲305.57 ▼0.0394.00 ▼0.7070.94 ▲27.70
Posts /wp-admin/edit.php2,133 ▲301.99 ▼0.0234.48 ▼5.5132.76 ▲0.16
Add New Post /wp-admin/post-new.php1,566 ▲3723.10 ▼0.02669.30 ▼20.85173.97 ▲114.63
Media Library /wp-admin/upload.php1,430 ▲274.19 ▼0.09110.88 ▲11.4177.77 ▲33.36
WpDevTool /wp-admin/admin.php?page=wpdevtool_admin1,9306.62126.7690.02
Crons Table /wp-admin/admin.php?page=wpdevtool_crons1,1812.0024.3437.63
Permalinks /wp-admin/admin.php?page=wpdevtool_permalinks1,1322.0023.1431.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpdevtool_permalinks
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

SRP 50% 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
  • 17× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WPDEVTOOL_ABS - assumed 'WPDEVTOOL_ABS' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpdevtool/core/core.php on line 8
    • > PHP Warning
      require_once(WPDEVTOOL_ABScore/error_handler.php): failed to open stream: No such file or directory in wp-content/plugins/wpdevtool/core/core.php on line 8
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpdevtool/core/error_handler.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpdevtool/core/log_console.php:235
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpdevtool/core/class-wdt_table.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpdevtool/views/permalinks.php:16
    • > PHP Fatal error
      require_once(): Failed opening required 'WPDEVTOOL_ABScore/error_handler.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpdevtool/core/core.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpdevtool/core/error_handler.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wpdevtool/inc/credits.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpdevtool/views/admin.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: debug, console, log, development, developer...

wpdevtool/wpdevtool.php Passed 13 tests

The entry point to "WpDevTool" version 0.1.1 is a PHP file that has certain tags in its header comment area
49 characters long description:
A simple tool to develop on WordPress platform...

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,200 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13347460962
PO File190113206
CSS281030
JavaScript1012

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity14.25
▷ Minimum class complexity10.00
▷ Maximum class complexity22.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1578.95%
▷ Protected methods00.00%
▷ Private methods421.05%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/develop_16.png0.89KB1.08KB0.00%
img/develop_32.png2.94KB1.96KB▼ 33.41%