78% css-js-files

Code Review | CSS JS Files

WordPress plugin CSS JS Files scored78%from 54 tests.

About plugin

  • Plugin page: css-js-files
  • Plugin version: 1.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Dec 15, 2016
  • Latest release: Sep 16, 2022
  • Number of updates: 21
  • Update frequency: every 99.9 days
  • Top authors: jamesdlow (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /4,485 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 gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼6.63ms] Passed 4 tests

Analyzing server-side resources used by CSS JS Files
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1337.78 ▲0.52
Dashboard /wp-admin3.42 ▲0.1243.54 ▼4.72
Posts /wp-admin/edit.php3.53 ▲0.1845.24 ▼1.00
Add New Post /wp-admin/post-new.php6.00 ▲0.1282.61 ▼19.70
Media Library /wp-admin/upload.php3.34 ▲0.1235.30 ▼1.09
Editor /wp-admin/admin.php?page=css-js-files-editor3.2928.03
CSS/JS Files /wp-admin/admin.php?page=css-js-files3.3131.40

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 18 new options
New WordPress options
css_js_files_head_rules
can_compress_scripts
css_js_files_js_files
css_js_files_css_rules
css_js_files_body_rules
css_js_files_footer_rules
css_js_files_css_files
widget_recent-posts
db_upgraded
css_js_files_js_admin
...

Browser metrics Passed 4 tests

CSS JS Files: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲13414.37 ▲0.001.72 ▲0.0841.11 ▲1.67
Dashboard /wp-admin2,237 ▲545.87 ▲0.90112.15 ▲1.2743.94 ▲2.26
Posts /wp-admin/edit.php2,126 ▲342.02 ▲0.0034.07 ▼5.7329.23 ▼5.93
Add New Post /wp-admin/post-new.php6,415 ▲4,88219.00 ▼4.20879.63 ▲274.1056.62 ▼2.08
Media Library /wp-admin/upload.php1,422 ▲344.24 ▼0.0799.05 ▲2.0640.23 ▼3.05
Editor /wp-admin/admin.php?page=css-js-files-editor9372.0334.8528.50
CSS/JS Files /wp-admin/admin.php?page=css-js-files1,0422.0726.1025.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 18 options in the database
    • css_js_files_path
    • css_js_files_css_links
    • css_js_files_js_admin
    • css_js_files_head_rules
    • theysaidso_admin_options
    • css_js_files_js_files
    • css_js_files_footer_rules
    • widget_theysaidso_widget
    • can_compress_scripts
    • css_js_files_css_files
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=css-js-files-editor
    • > Notice in wp-content/plugins/css-js-files/css-js-files.php+108
    Undefined index: file

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please 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 add_action() in wp-content/plugins/css-js-files/css-js-files.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

css-js-files/css-js-files.php Passed 13 tests

The main PHP file in "CSS JS Files" ver. 1.4.6 adds more information about the plugin and also serves as the entry point for this plugin
76 characters long description:
Add CSS files and/or CSS custom rules to any single page or post or globally

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
Success! There were no dangerous files found in this plugin432 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11330374
JavaScript17150
CSS1008

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity79.00
▷ Minimum class complexity79.00
▷ Maximum class complexity79.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods36
▷ Static methods36100.00%
▷ Public methods36100.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
PNG images were not found in this plugin