84% theme-junkie-custom-css

Code Review | TJ Custom CSS

WordPress plugin TJ Custom CSS scored84%from 54 tests.

About plugin

  • Plugin page: theme-junkie-cust...
  • Plugin version: 0.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2014
  • Latest release: Oct 26, 2022
  • Number of updates: 21
  • Update frequency: every 148.1 days
  • Top authors: themejunkie (95.24%)satrya (9.52%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10,000+ active /217,420 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.01MB] [CPU: ▼6.24ms] Passed 4 tests

An overview of server-side resources used by TJ Custom CSS
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.92 ▼5.51
Dashboard /wp-admin3.32 ▲0.0249.55 ▼4.34
Posts /wp-admin/edit.php3.37 ▲0.0250.82 ▲0.27
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.59 ▼15.36
Media Library /wp-admin/upload.php3.24 ▲0.0239.40 ▲2.60
Custom CSS /wp-admin/themes.php?page=tj-custom-css3.2133.09

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

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

Browser metrics Passed 4 tests

Checking browser requirements for TJ Custom CSS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▲0.211.70 ▲0.0140.60 ▼3.90
Dashboard /wp-admin2,196 ▲155.57 ▼0.1490.38 ▼13.0040.61 ▼10.21
Posts /wp-admin/edit.php2,101 ▲12.02 ▲0.0840.44 ▲2.6736.05 ▼3.71
Add New Post /wp-admin/post-new.php1,534 ▲623.23 ▲0.13673.49 ▼34.7665.81 ▲10.68
Media Library /wp-admin/upload.php1,404 ▲44.20 ▲0.0195.61 ▼12.3441.32 ▼4.12
Custom CSS /wp-admin/themes.php?page=tj-custom-css9952.1038.0233.06

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-custom-css/admin/admin.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-custom-css/inc/functions.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-junkie-custom-css/admin/customize.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/theme-junkie-custom-css/admin/customize-control-textarea.php:20

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Custom CSS settings.), #2 (Customizer.)
The official readme.txt might help

theme-junkie-custom-css/tj-custom-css.php 92% from 13 tests

The main PHP script in "TJ Custom CSS" version 0.1.6 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("theme-junkie-custom-css.php" instead of "tj-custom-css.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin397 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS23522220
PHP670179163
JavaScript20014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png7.03KB7.05KB0.00%
screenshot-1.png15.74KB15.26KB▼ 3.05%