73% easy-custom-cssjs

Code Review | Easy Custom Css/Js

WordPress plugin Easy Custom Css/Js scored73%from 54 tests.

About plugin

  • Plugin page: easy-custom-cssjs
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Jul 2, 2016
  • Latest release: Jan 28, 2023
  • Number of updates: 26
  • Update frequency: every 92.4 days
  • Top authors: sunil25393 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /4,905 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.14MB] [CPU: ▼4.66ms] Passed 4 tests

A check of server-side resources used by Easy Custom Css/Js
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1140.45 ▼0.53
Dashboard /wp-admin3.44 ▲0.1347.58 ▼2.40
Posts /wp-admin/edit.php3.54 ▲0.1848.77 ▲1.31
Add New Post /wp-admin/post-new.php6.12 ▲0.2378.20 ▼17.01
Media Library /wp-admin/upload.php3.38 ▲0.1536.69 ▲2.62

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 347 new files
Database: no new tables, 7 new options
New WordPress options
spcc_plugin_version
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Easy Custom Css/Js
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲10714.05 ▼0.691.71 ▼0.3035.00 ▼11.10
Dashboard /wp-admin2,233 ▲445.98 ▲1.04115.54 ▼8.3980.16 ▲35.17
Posts /wp-admin/edit.php2,134 ▲452.90 ▲0.8942.74 ▲5.1140.66 ▲6.40
Add New Post /wp-admin/post-new.php6,550 ▲5,01429.29 ▲6.141,001.53 ▲325.54150.68 ▲79.00
Media Library /wp-admin/upload.php1,430 ▲455.38 ▲1.1097.53 ▼16.2287.37 ▲39.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/easy-custom-cssjs/spcc_class.php+27
    Non-static method wpspcc::spcc_delete_options() should not be called statically
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • spcc_plugin_version
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/easy-custom-cssjs/template/form.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: stylesheet, custom js, site css, single post css, js...

easy-custom-cssjs/spcc-custom-css.php 77% from 13 tests

The principal PHP file in "Easy Custom Css/Js" v. 2.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/languages/")
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-custom-cssjs.php" instead of "spcc-custom-css.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin12,598 lines of code in 344 files:
LanguageFilesBlank linesComment linesLines of code
PHP51,4827546,824
CSS27115,270
JavaScript337340504

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity130.00
▷ Minimum class complexity1.00
▷ Maximum class complexity467.00
Average method complexity4.81
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods406
▷ Static methods81.97%
▷ Public methods8119.95%
▷ Protected methods32580.05%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
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
images/icon.png1.18KB0.26KB▼ 78.28%