87% wp-tool

Code Review | WP Tool

WordPress plugin WP Tool scored 87% from 54 tests.

About plugin

  • Plugin page: wp-tool
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.1
  • WordPress version: 5.8.1
  • First release: Dec 5, 2017
  • Latest release: Dec 6, 2017
  • Number of updates: 9
  • Update frequency: every 0.9 days
  • Top authors: shashankdeveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 550 total downloads


Plugin footprint Passed 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.03MB] [CPU: ▼144.24ms] Passed 4 tests

A check of server-side resources used by WP Tool
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0336.59 ▼0.92
Dashboard /wp-admin3.09 ▲0.0350.68 ▼3.42
Posts /wp-admin/edit.php3.14 ▲0.0345.18 ▼3.87
Add New Post /wp-admin/post-new.php5.45 ▲0.0299.69 ▼565.92
Media Library /wp-admin/upload.php3.03 ▲0.0238.26 ▼3.74

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for WP Tool
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,739 ▲14317.47 ▲1.9027.08 ▲17.3051.19 ▼5.85
Dashboard /wp-admin2,993 ▲635.86 ▼0.09145.28 ▼6.26126.06 ▲17.81
Posts /wp-admin/edit.php2,759 ▲232.69 ▲0.0267.07 ▼2.7399.33 ▲7.58
Add New Post /wp-admin/post-new.php1,696 ▲8118.20 ▼3.30387.45 ▲104.52106.93 ▼5.01
Media Library /wp-admin/upload.php1,830 ▲795.03 ▲0.05162.54 ▲1.41132.82 ▲8.63

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

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)
Even though no errors were found, this is by no means an exhaustive test

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 fix the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-tool/ajax/WeatherByLocData.php
    • > /wp-content/plugins/wp-tool/ajax/SearchByLocData.php
    • > /wp-content/plugins/wp-tool/ajax/DistanceByLocData.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-tool/index.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side


Plugin configuration 87% from 29 tests

readme.txt 88% 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 to be fixed:
  • Screenshots: Add a description for screenshot #6 in wp-tool/assets to your readme.txt
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-tool/index.php 85% from 13 tests

The entry point to "WP Tool" version 1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-tool.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 194 characters long)

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin672 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions8100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.19MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Screenshot1-WeatherForecastings.png31.75KB9.81KB▼ 69.08%
assets/Screenshot2-CurrencyConverter.png18.30KB6.32KB▼ 65.47%
assets/Screenshot3-DomainInfo.png19.84KB6.60KB▼ 66.72%
assets/Screenshot4-FindDistance.png35.57KB11.98KB▼ 66.31%
assets/Screenshot6-Shortcode.png36.25KB12.96KB▼ 64.24%