94% worthless-plugin

Code Review | Worthless Plugin

WordPress plugin Worthless Plugin scored 94% from 54 tests.

About plugin

  • Plugin page: worthless-plugin
  • Plugin version: 3.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 5.9.2
  • First release: Jul 27, 2008
  • Latest release: Jan 26, 2022
  • Number of updates: 39
  • Update frequency: every 126.4 days
  • Top authors: adegans (71.79%)SHRIKEE (30.77%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 2,676 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼328.24ms] 75% from 4 tests

This is a short check of server-side resources used by Worthless Plugin
The following require your attention
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,728.81ms on /wp-admin/options-general.php?page=worthless-plugin)
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0788.13 ▲36.55
Dashboard /wp-admin3.47 ▲0.0632.96 ▼84.56
Posts /wp-admin/edit.php3.70 ▲0.0637.24 ▼2.55
Add New Post /wp-admin/post-new.php6.94 ▼0.0391.44 ▼1,219.80
Media Library /wp-admin/upload.php3.35 ▲0.0624.41 ▼6.05
Worthless Plugin /wp-admin/options-general.php?page=worthless-plugin4.461,728.81

Server storage [IO: ▲0.08MB] [DB: ▲0.05MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Worthless Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,794 ▲4015.69 ▼0.088.66 ▲2.972.79 ▼0.08
Dashboard /wp-admin2,920 ▲595.99 ▼0.10128.54 ▼7.83179.78 ▲14.28
Posts /wp-admin/edit.php2,698 ▲143.25 ▲0.0064.37 ▼44.92144.57 ▼22.67
Add New Post /wp-admin/post-new.php1,678 ▲1215.61 ▼5.44425.14 ▼62.41158.60 ▼5.68
Media Library /wp-admin/upload.php1,731 ▲335.49 ▼0.01137.90 ▼27.30227.08 ▲34.21
Worthless Plugin /wp-admin/options-general.php?page=worthless-plugin1,2992.5382.30164.63

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

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

Smoke tests 75% 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 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/worthless-plugin/worthless-plugin.php

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, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
10 plugin tags: useful, email, fun, plugin, stats...

worthless-plugin/worthless-plugin.php 92% from 13 tests

"Worthless Plugin" version 3.3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 plugin199 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12037164
CSS17335

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/buttons/2.png7.27KB3.36KB▼ 53.83%
images/buttons/1.png8.33KB3.44KB▼ 58.73%
images/buttons/3.png4.08KB2.03KB▼ 50.28%