84% marzo-negro-ribbon

Code Review | Marzo Negro Ribbon

WordPress plugin Marzo Negro Ribbon scored84%from 54 tests.

About plugin

  • Plugin page: marzo-negro-ribbon
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0+
  • WordPress version: 6.3.1
  • First release: Feb 2, 2012
  • Latest release: Feb 2, 2012
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: bi0xid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /902 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.08ms] Passed 4 tests

Analyzing server-side resources used by Marzo Negro Ribbon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.40 ▼1.63
Dashboard /wp-admin3.31 ▼0.0349.49 ▼14.12
Posts /wp-admin/edit.php3.36 ▲0.0150.82 ▼1.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.23 ▼13.68
Media Library /wp-admin/upload.php3.23 ▲0.0139.59 ▼2.90
Marzo Negro /wp-admin/options-general.php?page=marzo-negro-ribbon/marzo-negro-ribbon.php3.2040.26

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
marzo_negro_language
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Marzo Negro Ribbon
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4914.27 ▼0.281.65 ▲0.1846.74 ▲4.50
Dashboard /wp-admin2,196 ▲165.54 ▼0.0885.54 ▼5.6837.63 ▼0.53
Posts /wp-admin/edit.php2,104 ▲12.04 ▲0.0836.55 ▲1.4033.43 ▼1.75
Add New Post /wp-admin/post-new.php1,529 ▲323.49 ▲0.33667.67 ▼16.8455.91 ▼13.87
Media Library /wp-admin/upload.php1,404 ▲74.16 ▼0.0396.36 ▼9.6042.72 ▼1.77
Marzo Negro /wp-admin/options-general.php?page=marzo-negro-ribbon/marzo-negro-ribbon.php8432.0327.8925.88

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • marzo_negro_language
    • widget_recent-posts

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)
Good news, no errors were detected

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/marzo-negro-ribbon/marzo-negro-ribbon.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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: Add images for these screenshots: #1 (Here's how the ribbon will appear on your website. Will link to the #MarzoNegro facebook site.), #2 (Admin panel)
  • Tested up to: Version not formatted correctly
The official readme.txt is a good inspiration

marzo-negro-ribbon/marzo-negro-ribbon.php Passed 13 tests

The main PHP script in "Marzo Negro Ribbon" version 1.0 is automatically included on every request by WordPress
113 characters long description:
When activated, this plugin will put a #MarzoNegro or #BlackMarch ribbon on the top right corner of your website.

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 detected60 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1141360

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.20MB with 0.13MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png38.04KB10.57KB▼ 72.21%
black-march-ribbon.png5.43KB2.27KB▼ 58.22%
screenshot-1.png155.83KB51.92KB▼ 66.68%
marzo-negro-ribbon.png5.56KB2.31KB▼ 58.39%