10% je-suis-charlie-ribbon-mc

Code Review | "Je suis Charlie" Ribbon MC

WordPress plugin "Je suis Charlie" Ribbon MC scored10%from 54 tests.

About plugin

  • Plugin page: je-suis-charlie-r...
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Jan 13, 2015
  • Latest release: Jan 14, 2015
  • Number of updates: 11
  • Update frequency: every 0.1 days
  • Top authors: ComputingFroggy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /874 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/je-suis-charlie-ribbon-mc/mc-je-suis-charlie.php+44
    Methods with the same name as their class will not be constructors in a future version of PHP; mc_jesuischarlie has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼54.94ms] Passed 4 tests

Server-side resources used by "Je suis Charlie" Ribbon MC
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.389.56 ▼27.18
Dashboard /wp-admin2.10 ▼1.206.16 ▼42.82
Posts /wp-admin/edit.php2.10 ▼1.256.97 ▼44.47
Add New Post /wp-admin/post-new.php2.10 ▼3.785.64 ▼105.29
Media Library /wp-admin/upload.php2.10 ▼1.136.31 ▼26.61
"Je Suis CHARLIE" Ribbon MC /wp-admin/options-general.php?page=mc_jesuischarlie_menu_id2.106.44

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

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

Browser metrics Passed 4 tests

A check of browser resources used by "Je suis Charlie" Ribbon MC
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.69 ▼0.624.66 ▲2.7443.67 ▲3.52
Dashboard /wp-admin2,210 ▲215.87 ▲0.9297.83 ▼9.8738.49 ▼5.52
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.0335.89 ▼4.3530.94 ▼5.62
Add New Post /wp-admin/post-new.php1,536 ▼623.11 ▲4.73673.48 ▲55.2154.00 ▼7.82
Media Library /wp-admin/upload.php1,392 ▲44.22 ▼0.0194.58 ▼4.2744.34 ▲1.61
"Je Suis CHARLIE" Ribbon MC /wp-admin/options-general.php?page=mc_jesuischarlie_menu_id8732.0623.1927.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/je-suis-charlie-ribbon-mc/mc-je-suis-charlie.php+44
    Methods with the same name as their class will not be constructors in a future version of PHP; mc_jesuischarlie has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=mc_jesuischarlie_menu_id
    • > Deprecated in wp-content/plugins/je-suis-charlie-ribbon-mc/mc-je-suis-charlie.php+44
    Methods with the same name as their class will not be constructors in a future version of PHP; mc_jesuischarlie has a deprecated constructor
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mc_jesuischarlie_menu_id
    • > Notice in wp-content/plugins/je-suis-charlie-ribbon-mc/admin_settings.php+96
    Trying to access array offset on value of type bool

SRP 0% 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/je-suis-charlie-ribbon-mc/mc-je-suis-charlie.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/je-suis-charlie-ribbon-mc/admin_settings.php:28

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 issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #2, #2 in je-suis-charlie-ribbon-mc/assets to your readme.txt
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === je-suis-charlie-ribbon-mc === )
The official readme.txt is a good inspiration

je-suis-charlie-ribbon-mc/mc-je-suis-charlie.php 77% from 13 tests

The main PHP file in ""Je suis Charlie" Ribbon MC" ver. 1.01 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("je-suis-charlie-ribbon-mc.php" instead of "mc-je-suis-charlie.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 214 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin277 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21919228
PO File1152849

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
mc-je-suis-charlie-left.png14.00KB9.08KB▼ 35.11%
mc-je-suis-charlie-right.png17.70KB9.15KB▼ 48.32%