84% wp-stop-cdb

Code Review | WP Stop UK Communications Data Bill Ribbon

WordPress plugin WP Stop UK Communications Data Bill Ribbon scored84%from 54 tests.

About plugin

  • Plugin page: wp-stop-cdb
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4
  • WordPress version: 6.3.1
  • First release: Jun 20, 2012
  • Latest release: Jun 20, 2012
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: vicchi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /875 total downloads

Benchmarks

Plugin footprint 83% from 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.02MB] [CPU: ▼0.93ms] Passed 4 tests

A check of server-side resources used by WP Stop UK Communications Data Bill Ribbon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.06 ▼0.21
Dashboard /wp-admin3.33 ▲0.0250.74 ▲6.64
Posts /wp-admin/edit.php3.38 ▲0.0244.77 ▼0.71
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.52 ▼3.36
Media Library /wp-admin/upload.php3.25 ▲0.0237.61 ▲0.56

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Stop UK Communications Data Bill Ribbon
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.32 ▲0.321.84 ▼0.0743.88 ▲3.01
Dashboard /wp-admin2,195 ▲245.64 ▲0.0486.77 ▼1.8242.31 ▼2.47
Posts /wp-admin/edit.php2,097 ▼02.03 ▲0.0333.60 ▼2.4635.84 ▼2.45
Add New Post /wp-admin/post-new.php1,526 ▼1123.31 ▲5.19644.96 ▲11.2458.26 ▲5.38
Media Library /wp-admin/upload.php1,394 ▼94.21 ▼0.1197.00 ▼18.3842.23 ▼5.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

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)
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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-stop-cdb/wp-stop-cdb.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues 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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Sample Screen Shot) image missing
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can take inspiration from this readme.txt

wp-stop-cdb/wp-stop-cdb.php Passed 13 tests

The primary PHP file in "WP Stop UK Communications Data Bill Ribbon" version 1.0 is used by WordPress to initiate all plugin functionality
119 characters long description:
Add a ribbon to the top right corner of your WordPress site to protest against the UK's Draft Communications Data bill.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin76 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2263768
CSS1118

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ribbon.png24.55KB7.36KB▼ 70.01%
images/template-ribbon.png5.68KB2.79KB▼ 50.83%