84% soma-ribbon

Code Review | SOMA Ribbon

WordPress plugin SOMA Ribbon scored84%from 54 tests.

About plugin

  • Plugin page: soma-ribbon
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.1
  • WordPress version: 6.3.1
  • First release: May 16, 2014
  • Latest release: May 16, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: m_uysl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /593 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by SOMA Ribbon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.62 ▼0.32
Dashboard /wp-admin3.31 ▲0.0044.82 ▼4.11
Posts /wp-admin/edit.php3.36 ▲0.0045.91 ▼1.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.96 ▼15.16
Media Library /wp-admin/upload.php3.23 ▲0.0035.64 ▼0.32

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

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

Browser metrics Passed 4 tests

SOMA Ribbon: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲5513.63 ▼1.141.78 ▲0.0442.51 ▼2.17
Dashboard /wp-admin2,206 ▲174.86 ▼1.07108.70 ▼12.6641.19 ▼6.27
Posts /wp-admin/edit.php2,086 ▼31.98 ▼0.0239.44 ▼0.4235.11 ▼5.75
Add New Post /wp-admin/post-new.php1,533 ▲522.99 ▲4.93671.07 ▲58.7467.23 ▲11.47
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.01100.22 ▼1.1143.42 ▲0.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/soma-ribbon/soma-ribbon.php:16

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe 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.)
Please take inspiration from this readme.txt

soma-ribbon/soma-ribbon.php Passed 13 tests

The principal PHP file in "SOMA Ribbon" v. 1.0 is loaded by WordPress automatically on each request
79 characters long description:
This plugin will put a black ribbon on the bottom right corner of your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin5 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1295

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for 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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.44MB with 0.39MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
black-ribbon.png67.57KB5.15KB▼ 92.37%
screenshot-1.png386.81KB68.67KB▼ 82.25%