84% legacy-jetpack-custom-css-editor

Code Review | Legacy Jetpack Custom CSS Editor

WordPress plugin Legacy Jetpack Custom CSS Editor scored84%from 54 tests.

About plugin

  • Plugin page: legacy-jetpack-cu...
  • Plugin version: 0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7+
  • WordPress version: 6.3.1
  • First release: Dec 14, 2016
  • Latest release: Dec 16, 2016
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: georgestephanis (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /2,031 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.46ms] Passed 4 tests

A check of server-side resources used by Legacy Jetpack Custom CSS Editor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0450.02 ▲4.66
Dashboard /wp-admin3.35 ▲0.0149.31 ▼10.30
Posts /wp-admin/edit.php3.41 ▲0.0550.52 ▼2.91
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.14 ▼26.46
Media Library /wp-admin/upload.php3.28 ▲0.0537.24 ▲1.85

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Legacy Jetpack Custom CSS Editor: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.27 ▼0.391.62 ▼0.6237.55 ▼1.85
Dashboard /wp-admin2,189 ▲115.51 ▼0.1184.80 ▼17.9238.75 ▼4.20
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0739.71 ▼1.2836.40 ▼0.46
Add New Post /wp-admin/post-new.php1,526 ▼223.68 ▲0.64692.76 ▲56.8844.26 ▼7.18
Media Library /wp-admin/upload.php1,397 ▼34.23 ▲0.03101.65 ▲2.6444.55 ▼2.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/legacy-jetpack-custom-css-editor/legacy-jetpack-custom-css-editor.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues 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
These attributes need your attention:
  • Tested up to: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

legacy-jetpack-custom-css-editor/legacy-jetpack-custom-css-editor.php Passed 13 tests

The main file in "Legacy Jetpack Custom CSS Editor" v. 0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
69 characters long description:
This plugin re-adds the full page admin Custom CSS editor to Jetpack.

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
There were no executable files found in this plugin344 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12941269
JavaScript17375

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity5.67
▷ Minimum method complexity2.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods6100.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There were not PNG files found in your plugin