89% cc-scripts

Code Review | CC-Scripts

WordPress plugin CC-Scripts scored89%from 54 tests.

About plugin

  • Plugin page: cc-scripts
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.4
  • WordPress version: 6.3.1
  • First release: Aug 24, 2016
  • Latest release: Feb 28, 2018
  • Number of updates: 4
  • Update frequency: every 138.5 days
  • Top authors: ClearcodeHQ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,526 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▲1.57ms] Passed 4 tests

A check of server-side resources used by CC-Scripts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1139.55 ▲3.07
Dashboard /wp-admin3.37 ▲0.0646.71 ▼0.64
Posts /wp-admin/edit.php3.48 ▲0.1349.33 ▲6.48
Add New Post /wp-admin/post-new.php5.95 ▲0.0697.03 ▼0.32
Media Library /wp-admin/upload.php3.29 ▲0.0637.30 ▲4.15
Scripts /wp-admin/options-general.php?page=scripts3.3233.24

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
Clearcode\Scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by CC-Scripts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.35 ▼0.411.70 ▲0.0636.07 ▼6.07
Dashboard /wp-admin2,203 ▲235.59 ▼0.0583.59 ▼3.8137.76 ▼7.85
Posts /wp-admin/edit.php2,108 ▲112.03 ▲0.0639.70 ▲2.8236.70 ▼3.11
Add New Post /wp-admin/post-new.php1,532 ▲623.31 ▲0.33593.71 ▼63.4947.23 ▼6.68
Media Library /wp-admin/upload.php1,408 ▲84.26 ▲0.08100.62 ▲5.4141.96 ▼0.97
Scripts /wp-admin/options-general.php?page=scripts1,0482.1925.3529.93

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
The SRP test was a success

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Screenshots: Screenshot #1 (**WordPress General Settings** - Visit 'Settings > Scripts', add your scripts into the head and/or body fields and chose the method of inclusion.) image not found
The official readme.txt might help

cc-scripts/plugin.php 92% from 13 tests

The entry point to "CC-Scripts" version 1.2.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cc-scripts.php" instead of "plugin.php")

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
Good job! No executable or dangerous file extensions detected1,184 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP141624181,100
PO File1223573
JavaScript1208
CSS1003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity27.00
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods57
▷ Static methods1628.07%
▷ Public methods4070.18%
▷ Protected methods1628.07%
▷ Private methods11.75%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png163.54KB58.67KB▼ 64.12%