74% ajax-awesome-css

Code Review | Ajax Custom CSS/JS

WordPress plugin Ajax Custom CSS/JS scored74%from 54 tests.

About plugin

  • Plugin page: ajax-awesome-css
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Sep 17, 2016
  • Latest release: Feb 12, 2018
  • Number of updates: 34
  • Update frequency: every 15.1 days
  • Top authors: harry005 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /3,976 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼2.08ms] Passed 4 tests

A check of server-side resources used by Ajax Custom CSS/JS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.78 ▼5.99
Dashboard /wp-admin3.49 ▲0.1951.01 ▼0.40
Posts /wp-admin/edit.php3.61 ▲0.2555.34 ▼1.02
Add New Post /wp-admin/post-new.php6.08 ▲0.19100.68 ▼0.90
Media Library /wp-admin/upload.php3.41 ▲0.1946.16 ▲12.48
Ajax Custom CSS /wp-admin/admin.php?page=hsacc3.3834.99
Add Ajax JS /wp-admin/admin.php?page=hsaddaccjs3.3837.51
Add Ajax CSS /wp-admin/admin.php?page=hsaddacc3.3834.16

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 96 new files
Database: 1 new table, 7 new options
New tables
wp_awesomecustom
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
hsawesome_db_version
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Ajax Custom CSS/JS
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲21613.88 ▼0.801.80 ▲0.0044.56 ▲4.89
Dashboard /wp-admin2,368 ▲1835.46 ▼0.42108.96 ▼1.4849.52 ▲4.98
Posts /wp-admin/edit.php2,252 ▲1632.46 ▲0.4243.59 ▲1.5636.67 ▼0.07
Add New Post /wp-admin/post-new.php1,824 ▲29423.08 ▼0.16691.45 ▲110.1632.17 ▼19.96
Media Library /wp-admin/upload.php1,548 ▲1604.75 ▲0.57111.95 ▲13.4251.34 ▲7.19
Ajax Custom CSS /wp-admin/admin.php?page=hsacc1,0042.1932.4239.83
Add Ajax JS /wp-admin/admin.php?page=hsaddaccjs1,4132.5141.7038.63
Add Ajax CSS /wp-admin/admin.php?page=hsaddacc1,4132.4838.7333.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_awesomecustom
  • Zombie WordPress options were found after uninstall: 7 options
    • hsawesome_db_version
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hsaddacc
    • > Network (severe)
    wp-content/plugins/ajax-awesome-css/includes/admin/codemirror/addon/jshint/jshint.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hsaddacc
    • > Network (severe)
    wp-content/plugins/ajax-awesome-css/includes/admin/codemirror/addon/jshint/jsonlint.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hsaddacc
    • > Network (severe)
    selectthemejs/?ver=6.3.1 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hsaddacc
    • > Network (severe)
    selecttheme/?ver=6.3.1 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=hsaddaccjs
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=hsaddaccjs 318:51 Uncaught TypeError: Cannot read properties of null (reading 'value')
    • > GET request to /wp-admin/admin.php?page=hsaddacc
    • > Javascript (severe) in unknown
    /wp-content/plugins/ajax-awesome-css/includes/admin/codemirror/lib/codemirror.js?ver=6.3.1 5951:29 Uncaught TypeError: Cannot read properties of null (reading 'value')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
9 plugin tags: custom css, custom javascript, js editor, ajax, jss...

ajax-awesome-css/ajax-awesome-css.php 92% from 13 tests

The principal PHP file in "Ajax Custom CSS/JS" v. 2.0.4 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 205 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin14,693 lines of code in 89 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript291,3511,11511,473
CSS503422391,955
PHP34524646
HTML71150619

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.29
Average class complexity32.67
▷ Minimum class complexity2.00
▷ Maximum class complexity90.00
Average method complexity5.52
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods21
▷ Static methods314.29%
▷ Public methods21100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/images/support-us.png15.67KB5.80KB▼ 62.98%
includes/admin/images/icon.png0.71KB0.48KB▼ 32.88%