93% je-suis-charlie

Code Review | Je suis Charlie

WordPress plugin Je suis Charlie scored 93% from 54 tests.

About plugin

  • Plugin page: je-suis-charlie
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-4.1
  • WordPress version: 5.8.1
  • First release: Jan 7, 2015
  • Latest release: Jan 8, 2015
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: juliobox (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

10+ active / 3,369 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.00MB] [CPU: ▼143.81ms] Passed 4 tests

Server-side resources used by Je suis Charlie
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1232.58 ▲13.67
Dashboard /wp-admin3.06 ▲0.0144.18 ▼0.38
Posts /wp-admin/edit.php3.11 ▲0.0042.48 ▼0.65
Add New Post /wp-admin/post-new.php5.42 ▼0.0284.80 ▼572.86
Media Library /wp-admin/upload.php3.00 ▲0.0032.68 ▼1.34

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Je suis Charlie
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,707 ▲11115.88 ▲0.3410.36 ▲2.7246.06 ▼0.44
Dashboard /wp-admin2,967 ▲335.87 ▼0.07139.67 ▼0.49108.84 ▼2.90
Posts /wp-admin/edit.php2,736 ▼32.69 ▲0.0162.85 ▼3.7186.36 ▼8.77
Add New Post /wp-admin/post-new.php1,500 ▼17218.57 ▼0.37372.87 ▲16.03105.78 ▼3.48
Media Library /wp-admin/upload.php1,807 ▼05.03 ▲0.00139.41 ▼7.66117.21 ▼3.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/je-suis-charlie/je-suis-charlie-left.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/je-suis-charlie/je-suis-charlie.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes: You can take inspiration from this readme.txt

je-suis-charlie/je-suis-charlie-left.php 85% from 13 tests

The main PHP file in "Je suis Charlie" ver. 1.1 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:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("je-suis-charlie.php" instead of "je-suis-charlie-left.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 153 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected16 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP221816

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
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%
Functions2
▷ Named functions2100.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.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
je-suis-charlie.png12.78KB5.21KB▼ 59.19%
je-suis-charlie-left.png12.83KB5.15KB▼ 59.88%