84% wtools

Code Review | WTools

WordPress plugin WTools scored84%from 54 tests.

About plugin

  • Plugin page: wtools
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7
  • WordPress version: 6.3.1
  • First release: Feb 24, 2017
  • Latest release: Mar 25, 2020
  • Number of updates: 9
  • Update frequency: every 124.3 days
  • Top authors: junaidpv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /582 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.57ms] Passed 4 tests

A check of server-side resources used by WTools
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.64 ▼7.18
Dashboard /wp-admin3.31 ▼0.0448.35 ▼12.28
Posts /wp-admin/edit.php3.36 ▲0.0048.83 ▼4.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.96 ▼10.72
Media Library /wp-admin/upload.php3.23 ▲0.0038.74 ▼0.20

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WTools
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.23 ▼0.341.93 ▲0.2240.88 ▲2.43
Dashboard /wp-admin2,195 ▲275.62 ▲0.1090.54 ▼13.0237.88 ▼9.96
Posts /wp-admin/edit.php2,103 ▲32.03 ▼0.0939.85 ▲1.7735.01 ▲0.86
Add New Post /wp-admin/post-new.php1,529 ▲123.11 ▼0.09680.91 ▲32.6561.91 ▲10.01
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.0695.92 ▼15.8646.60 ▲3.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wtools/wtools.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
4 plugin tags: form, development, model, router

wtools/wtools.php Passed 13 tests

This is the main PHP file of "WTools" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
84 characters long description:
WTools brings various functions and classes to make developing other plugins faster.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin775 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP12100364775

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity8.62
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes5
▷ Abstract classes240.00%
▷ Concrete classes360.00%
▷ Final classes00.00%
Methods38
▷ Static methods1436.84%
▷ Public methods3592.11%
▷ Protected methods25.26%
▷ Private methods12.63%
Functions35
▷ Named functions3497.14%
▷ Anonymous functions12.86%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

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