78% purgebox

Code Review | PURGE BOX

WordPress plugin PURGE BOX scored78%from 54 tests.

About plugin

  • Plugin page: purgebox
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 30, 2017
  • Latest release: Jun 7, 2023
  • Number of updates: 30
  • Update frequency: every 77.2 days
  • Top authors: redboxcdn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /902 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.32ms] Passed 4 tests

This is a short check of server-side resources used by PURGE BOX
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0746.41 ▲1.53
Dashboard /wp-admin3.38 ▲0.0855.11 ▲0.35
Posts /wp-admin/edit.php3.50 ▲0.1452.35 ▼2.86
Add New Post /wp-admin/post-new.php5.96 ▲0.0887.29 ▼13.84
Media Library /wp-admin/upload.php3.31 ▲0.0839.04 ▼0.92
PurgeBox /wp-admin/options-general.php?page=redbox-wp-purge3.2736.86

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

PURGE BOX: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.38 ▼0.281.70 ▼0.2543.29 ▲0.47
Dashboard /wp-admin2,209 ▲325.52 ▼0.1181.89 ▼18.2438.47 ▼3.10
Posts /wp-admin/edit.php2,114 ▲142.00 ▼0.0334.44 ▼3.8833.71 ▼1.59
Add New Post /wp-admin/post-new.php1,542 ▲1618.29 ▼4.86629.75 ▼65.3667.38 ▲5.41
Media Library /wp-admin/upload.php1,408 ▲84.23 ▲0.0599.46 ▼1.2948.83 ▲2.08
PurgeBox /wp-admin/options-general.php?page=redbox-wp-purge8321.9925.7424.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/purgebox/classes/class-purgebox-plugin.php:39

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=redbox-wp-purge
    • > Network (severe)
    wp-content/plugins/purgebox/assets/css/purgebox.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (PURGE BOX) image required
  • Donate link: Please fix this invalid url: "NONE"
Please take inspiration from this readme.txt

purgebox/purgebox.php Passed 13 tests

The main file in "PURGE BOX" v. 1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
24 characters long description:
REDBOX CDN Purge Plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin402 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP671274365
Markdown116034
CSS1053

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.25
▷ Minimum class complexity3.00
▷ Maximum class complexity29.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods38
▷ Static methods410.53%
▷ Public methods2771.05%
▷ Protected methods1128.95%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin