94% 26-march-ribbon

Code Review | 26 March Ribbon

WordPress plugin 26 March Ribbon scored 94% from 54 tests.

About plugin

  • Plugin page: 26-march-ribbon
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-3.3.1
  • WordPress version: 5.9.2
  • First release: Mar 20, 2012
  • Latest release: Mar 22, 2012
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: cxbuppy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,525 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.02MB] [CPU: ▼298.38ms] Passed 4 tests

Server-side resources used by 26 March Ribbon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0151.91 ▲3.52
Dashboard /wp-admin3.41 ▲0.0132.59 ▲0.72
Posts /wp-admin/edit.php3.64 ▲0.0134.13 ▼3.46
Add New Post /wp-admin/post-new.php6.88 ▼0.0995.42 ▼1,190.12
Media Library /wp-admin/upload.php3.30 ▲0.0023.93 ▼0.66

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

26 March Ribbon: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,767 ▲1316.16 ▲0.186.01 ▼0.142.46 ▼0.47
Dashboard /wp-admin2,895 ▲345.99 ▼0.23118.81 ▼15.97156.19 ▼4.82
Posts /wp-admin/edit.php2,694 ▲33.24 ▼0.0165.14 ▼1.02135.36 ▼8.98
Add New Post /wp-admin/post-new.php1,711 ▼6220.76 ▼0.23430.47 ▼30.04159.82 ▼3.86
Media Library /wp-admin/upload.php1,695 ▼05.52 ▲0.06144.74 ▼1.50188.29 ▲3.47

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/26-march-ribbon/26-march-ribbon.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Here's how the ribbon will appear on your website.)
The official readme.txt is a good inspiration

26-march-ribbon/26-march-ribbon.php Passed 13 tests

The main PHP script in "26 March Ribbon" version 2.0 is automatically included on every request by WordPress
87 characters long description:
When activated, this plugin will put a ribbon on the top right corner of your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected7 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1287

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.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 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.68MB with 0.45MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png633.16KB228.90KB▼ 63.85%
26-march-ribbon.png60.87KB19.39KB▼ 68.15%