78% re-abolish-slavery-ribbon

Code Review | Re-Abolish Slavery Ribbon

WordPress plugin Re-Abolish Slavery Ribbon scored78%from 54 tests.

About plugin

  • Plugin page: re-abolish-slaver...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.6
  • WordPress version: 6.3.1
  • First release: Sep 12, 2011
  • Latest release: Jul 16, 2016
  • Number of updates: 34
  • Update frequency: every 52.4 days
  • Top authors: iandunn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,644 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.92ms] Passed 4 tests

An overview of server-side resources used by Re-Abolish Slavery Ribbon
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0546.30 ▲5.18
Dashboard /wp-admin3.35 ▲0.0450.97 ▲0.07
Posts /wp-admin/edit.php3.40 ▲0.0448.85 ▼8.49
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.65 ▲0.25
Media Library /wp-admin/upload.php3.28 ▲0.0436.89 ▲0.51
Re-Abolish Slavery Ribbon /wp-admin/options-general.php?page=rasr_settings3.2534.87

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Re-Abolish Slavery Ribbon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲12713.52 ▼0.888.78 ▲7.0446.22 ▲6.26
Dashboard /wp-admin2,202 ▲255.64 ▼0.0482.96 ▼7.9539.52 ▲1.74
Posts /wp-admin/edit.php2,107 ▲42.11 ▲0.1536.34 ▼5.2231.21 ▼8.26
Add New Post /wp-admin/post-new.php1,529 ▲323.24 ▲0.28616.54 ▼84.4255.00 ▼3.10
Media Library /wp-admin/upload.php1,398 ▼24.17 ▲0.0496.90 ▼13.3741.09 ▼6.35
Re-Abolish Slavery Ribbon /wp-admin/options-general.php?page=rasr_settings8722.0327.0528.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/re-abolish-slavery-ribbon/classes/core.php
    • > /wp-content/plugins/re-abolish-slavery-ribbon/re-abolish-slavery-ribbon.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/re-abolish-slavery-ribbon/views/ribbon-markup.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/re-abolish-slavery-ribbon/views/settings.php:6
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/re-abolish-slavery-ribbon/views/setting-fields.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/re-abolish-slavery-ribbon/views/setting-fields.php on line 10
    • > PHP Warning
      Use of undefined constant RASR_NAME - assumed 'RASR_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/re-abolish-slavery-ribbon/views/settings.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/re-abolish-slavery-ribbon/views/setting-fields.php on line 20
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/re-abolish-slavery-ribbon/views/setting-fields.php on line 20
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/re-abolish-slavery-ribbon/views/setting-fields.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/re-abolish-slavery-ribbon/views/setting-fields.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention: Please take inspiration from this readme.txt

re-abolish-slavery-ribbon/re-abolish-slavery-ribbon.php Passed 13 tests

This is the main PHP file of "Re-Abolish Slavery Ribbon" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
120 characters long description:
Adds a "re-abolish slavery" ribbon to the upper right-hand corner of your site, which links to the Not For Sale campaign

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected223 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP543102166
CSS19646
JavaScript12711

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ribbon-top-left.png30.21KB11.91KB▼ 60.59%
images/add-to-website.png1.79KB1.76KB▼ 1.80%
images/ribbon-top-right.png32.73KB13.37KB▼ 59.15%