83% jp-important-days-ribbon

Code Review | JP Important Days Ribbon

WordPress plugin JP Important Days Ribbon scored83%from 54 tests.

About plugin

  • Plugin page: jp-important-days...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1.1
  • WordPress version: 6.3.1
  • First release: Jun 15, 2015
  • Latest release: Jun 23, 2015
  • Number of updates: 21
  • Update frequency: every 0.5 days
  • Top authors: Skjoy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /557 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by JP Important Days Ribbon
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.60 ▼3.68
Dashboard /wp-admin3.33 ▲0.0249.74 ▼3.73
Posts /wp-admin/edit.php3.38 ▲0.0247.33 ▼2.39
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.76 ▼15.98
Media Library /wp-admin/upload.php3.25 ▲0.0235.66 ▼1.83
Important Days Ribbon Settings /wp-admin/options-general.php?page=jp_important_days_ribbon_settings3.2538.12

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for JP Important Days Ribbon
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.75 ▲0.541.94 ▼0.1345.62 ▲0.40
Dashboard /wp-admin2,202 ▲255.59 ▼0.0284.82 ▼8.4039.37 ▼5.09
Posts /wp-admin/edit.php2,104 ▲11.98 ▲0.0138.80 ▲2.3633.20 ▼2.46
Add New Post /wp-admin/post-new.php1,529 ▲323.13 ▲0.10687.19 ▲32.9356.17 ▲3.82
Media Library /wp-admin/upload.php1,398 ▼24.27 ▲0.08103.97 ▲4.5745.64 ▼0.42
Important Days Ribbon Settings /wp-admin/options-general.php?page=jp_important_days_ribbon_settings1,0903.2353.1929.81

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/jp-important-days-ribbon/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Screenshot-1.jpg) image required
The official readme.txt might help

jp-important-days-ribbon/index.php 77% from 13 tests

The main PHP file in "JP Important Days Ribbon" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 318 characters long)
  • Requires at least: Required version does not match the one declared in readme.txt ("2.6.0" instead of "3.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("jp-important-days-ribbon.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin482 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP27170416
JavaScript1241366

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity4.27
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/sk.png4.75KB1.15KB▼ 75.70%