62% ribbon-maker

Code Review | Ribbon Maker

WordPress plugin Ribbon Maker scored62%from 54 tests.

About plugin

  • Plugin page: ribbon-maker
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.4.1
  • WordPress version: 6.3.1
  • First release: Apr 24, 2012
  • Latest release: Nov 13, 2012
  • Number of updates: 29
  • Update frequency: every 7.0 days
  • Top authors: itscoolreally (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /6,521 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.87MB] [CPU: ▼40.75ms] Passed 4 tests

This is a short check of server-side resources used by Ribbon Maker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1039.07 ▼5.81
Dashboard /wp-admin3.08 ▼0.2723.78 ▼37.98
Posts /wp-admin/edit.php3.08 ▼0.2825.28 ▼25.90
Add New Post /wp-admin/post-new.php3.08 ▼2.8123.43 ▼83.67
Media Library /wp-admin/upload.php3.08 ▼0.1520.60 ▼15.44
Ribbon Maker /wp-admin/tools.php?page=ribbon-maker/ribbon-maker.php3.0823.83

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Ribbon Maker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲16013.46 ▼0.8911.71 ▲10.0540.28 ▲1.31
Dashboard /wp-admin2,219 ▲395.65 ▲0.0591.19 ▲4.3541.40 ▼13.86
Posts /wp-admin/edit.php2,121 ▲212.00 ▲0.0237.34 ▼5.7934.28 ▼6.22
Add New Post /wp-admin/post-new.php1,536 ▲823.31 ▲0.43662.57 ▼37.0353.37 ▼8.06
Media Library /wp-admin/upload.php1,418 ▲244.20 ▼0.0299.52 ▼10.2245.90 ▼5.78
Ribbon Maker /wp-admin/tools.php?page=ribbon-maker/ribbon-maker.php1,1791.6929.2648.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=ribbon-maker/ribbon-maker.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=ribbon-maker/ribbon-maker.php
    • > Notice in wp-content/plugins/ribbon-maker/ribbon-maker.php+208
    Undefined index: ribbon_maker_slot

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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ribbon-maker/ribbon-maker.php:28

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/tools.php?page=ribbon-maker/ribbon-maker.php
    • > Network (severe)
    wp-content/plugins/ribbon-maker/ribbon_maker_ribbon1.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/tools.php?page=ribbon-maker/ribbon-maker.php
    • > Network (severe)
    wp-content/plugins/ribbon-maker/ribbon_maker_ribbon2.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/tools.php?page=ribbon-maker/ribbon-maker.php
    • > Network (severe)
    wp-content/plugins/ribbon-maker/ribbon_maker_ribbon4.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/tools.php?page=ribbon-maker/ribbon-maker.php
    • > Network (severe)
    wp-content/plugins/ribbon-maker/ribbon_maker_ribbon3.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (An example of three of the ribbons on your site.)
You can look at the official readme.txt

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

The main PHP file in "Ribbon Maker" ver. 1.6.2 adds more information about the plugin and also serves as the entry point for this plugin
126 characters long description:
When activated, this plugin will put a ribbon of your design, message and custom link 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
Success! There were no dangerous files found in this plugin7,619 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41,6171,4337,224
PHP16732386
HTML1309

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions15
▷ Named functions15100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.50MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ribbon_maker_jscolor/hv.png2.80KB7.32KB0.00%
screenshot-2.png150.30KB61.67KB▼ 58.97%
screenshot-1.png54.92KB19.27KB▼ 64.92%
screenshot-3.png301.27KB109.42KB▼ 63.68%
ribbon_maker_jscolor/hs.png2.62KB7.54KB0.00%