79% add-css-and-js-option-page-wise

Code Review | Add Css And Js Option Page Wise

WordPress plugin Add Css And Js Option Page Wise scored79%from 54 tests.

About plugin

  • Plugin page: add-css-and-js-op...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 1, 2019
  • Latest release: Feb 1, 2019
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: chintan238 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /702 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Add Css And Js Option Page Wise
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0349.43 ▲7.23
Dashboard /wp-admin3.32 ▲0.0150.33 ▲1.56
Posts /wp-admin/edit.php3.37 ▲0.0148.78 ▲0.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.41 ▼12.84
Media Library /wp-admin/upload.php3.24 ▲0.0135.47 ▲1.83

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add Css And Js Option Page Wise
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.27 ▼0.251.88 ▼1.1641.83 ▼0.10
Dashboard /wp-admin2,218 ▲515.54 ▼0.1298.00 ▼5.0544.54 ▲4.58
Posts /wp-admin/edit.php2,127 ▲242.07 ▲0.1243.98 ▲5.6337.83 ▲2.82
Add New Post /wp-admin/post-new.php1,549 ▲2118.61 ▼4.68681.00 ▲8.4570.60 ▲18.31
Media Library /wp-admin/upload.php1,414 ▲114.27 ▲0.0699.44 ▼13.4242.73 ▼4.91

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'OCSSJS' does not have a method 'deactivate'
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: Please take inspiration from this readme.txt

add-css-and-js-option-page-wise/css-js-ordeing-page-wise.php 92% from 13 tests

The main file in "Add Css And Js Option Page Wise" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("add-css-and-js-option-page-wise.php" instead of "css-js-ordeing-page-wise.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin634 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
SVG100255
PHP12826163
CSS1190145
JavaScript219071

PHP code Passed 2 tests

This is a very shot 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.38
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin