78% ns-custom-css

Code Review | NS Custom Css

WordPress plugin NS Custom Css scored78%from 54 tests.

About plugin

  • Plugin page: ns-custom-css
  • Plugin version: 2.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.9
  • WordPress version: 6.3.1
  • First release: Sep 29, 2016
  • Latest release: Feb 7, 2022
  • Number of updates: 42
  • Update frequency: every 46.6 days
  • Top authors: nsthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,471 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.91ms] Passed 4 tests

A check of server-side resources used by NS Custom Css
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0233.98 ▼6.01
Dashboard /wp-admin3.33 ▲0.0343.34 ▼5.76
Posts /wp-admin/edit.php3.44 ▲0.0946.27 ▼3.18
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.34 ▼8.68
Media Library /wp-admin/upload.php3.25 ▲0.0236.76 ▲2.15
How to install premium version /wp-admin/admin.php?page=how-to-install-premium-version3.1929.46
Custom Css /wp-admin/admin.php?page=ns-custom-css/ns-admin-options/ns_admin_option_dashboard.php3.2533.13
/wp-admin/admin.php?page=plugineye2383.2229.01

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for NS Custom Css
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8414.80 ▲0.411.58 ▼0.4142.12 ▼5.44
Dashboard /wp-admin2,239 ▲485.83 ▲0.92102.07 ▼4.4289.45 ▲46.97
Posts /wp-admin/edit.php2,122 ▲332.00 ▼0.0436.57 ▼6.8433.34 ▼2.32
Add New Post /wp-admin/post-new.php1,695 ▲17622.35 ▼0.58743.51 ▲100.0757.81 ▲0.47
Media Library /wp-admin/upload.php1,412 ▲274.20 ▲0.0495.37 ▼9.6881.28 ▲37.43
How to install premium version /wp-admin/admin.php?page=how-to-install-premium-version6841.146.9816.70
Custom Css /wp-admin/admin.php?page=ns-custom-css/ns-admin-options/ns_admin_option_dashboard.php9162.0323.2830.57
/wp-admin/admin.php?page=plugineye2389032.0325.9125.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=how-to-install-premium-version
    • > Warning in wp-includes/pluggable.php+1438
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-custom-css/plugineye/plugineye-ajax/plugineye_on_deactivation_function.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Settings Custom Css.), #2 (View graphics example.), #3 (View source after adding code.)
You can look at the official readme.txt

ns-custom-css/ns-custom-css.php Passed 13 tests

This is the main PHP file of "NS Custom Css" version 2.2.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
40 characters long description:
This plugin allow to add your custom css

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin931 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1157181579
CSS3228276
PO File1161648
JavaScript14028

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods526.32%
▷ Protected methods00.00%
▷ Private methods1473.68%
Functions16
▷ Named functions637.50%
▷ Anonymous functions1062.50%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.61MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ns-admin-options/img/backend-sidebar-icon.png1.48KB0.54KB▼ 63.47%
ns-admin-options/img/ns-theme-promo.png29.37KB8.96KB▼ 69.50%
screenshot-2.png22.40KB5.38KB▼ 75.99%
screenshot-3.png518.52KB176.23KB▼ 66.01%
screenshot-1.png32.11KB7.46KB▼ 76.78%