84% stop-sopa-ribbon

Code Review | Stop SOPA Ribbon

WordPress plugin Stop SOPA Ribbon scored84%from 54 tests.

About plugin

  • Plugin page: stop-sopa-ribbon
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-3.3.1
  • WordPress version: 6.3.1
  • First release: Jan 11, 2012
  • Latest release: Jan 11, 2012
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: kovshenin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /10,826 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.75ms] Passed 4 tests

An overview of server-side resources used by Stop SOPA Ribbon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0139.03 ▼2.87
Dashboard /wp-admin3.31 ▲0.0043.93 ▼6.69
Posts /wp-admin/edit.php3.36 ▲0.0043.81 ▼11.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.26 ▼17.91
Media Library /wp-admin/upload.php3.23 ▲0.0032.87 ▼0.72

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Stop SOPA Ribbon
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.32 ▼1.304.24 ▲2.4842.42 ▼3.64
Dashboard /wp-admin2,206 ▲184.86 ▼0.04106.65 ▼9.5540.82 ▼6.69
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0239.12 ▲2.0835.29 ▲1.91
Add New Post /wp-admin/post-new.php1,514 ▼2817.69 ▼0.69627.46 ▲17.1943.01 ▼8.68
Media Library /wp-admin/upload.php1,388 ▼34.15 ▼0.0595.69 ▼6.7341.38 ▼4.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 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/stop-sopa-ribbon/stop-sopa-ribbon.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Here's how the ribbon will appear on your website. Will link to the americancensorship.org site.)
The official readme.txt is a good inspiration

stop-sopa-ribbon/stop-sopa-ribbon.php Passed 13 tests

"Stop SOPA Ribbon" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
96 characters long description:
When activated, this plugin will put a Stop SOPA ribbon on the top right corner of your website.

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
There were no executable files found in this plugin6 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1196

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
2 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
stop-sopa-ribbon.png8.16KB2.33KB▼ 71.50%
screenshot-1.png64.96KB18.34KB▼ 71.76%