89% cc-syntax-highlight

Code Review | CC-Syntax-Highlight

WordPress plugin CC-Syntax-Highlight scored89%from 54 tests.

About plugin

  • Plugin page: cc-syntax-highlight
  • Plugin version: 1.2.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-5.9.2
  • WordPress version: 6.3.1
  • First release: Sep 29, 2016
  • Latest release: Mar 16, 2022
  • Number of updates: 10
  • Update frequency: every 199.4 days
  • Top authors: ClearcodeHQ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,565 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼5.14ms] Passed 4 tests

Server-side resources used by CC-Syntax-Highlight
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1442.83 ▼5.16
Dashboard /wp-admin3.49 ▲0.1450.92 ▼0.21
Posts /wp-admin/edit.php3.60 ▲0.2045.99 ▼1.86
Add New Post /wp-admin/post-new.php6.07 ▲0.1492.72 ▼13.34
Media Library /wp-admin/upload.php3.41 ▲0.1441.35 ▲5.66
Syntax Highlight /wp-admin/options-general.php?page=syntax_highlight3.3832.80

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 172 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
Clearcode\Syntax_Highlight
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by CC-Syntax-Highlight
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.35 ▼0.271.62 ▲0.0841.40 ▲1.02
Dashboard /wp-admin2,201 ▲235.52 ▼0.2083.67 ▼17.7543.91 ▼3.09
Posts /wp-admin/edit.php2,106 ▲62.00 ▼0.0035.58 ▼5.6633.68 ▼2.95
Add New Post /wp-admin/post-new.php1,533 ▲723.18 ▼0.46679.69 ▲28.9562.16 ▲4.24
Media Library /wp-admin/upload.php1,403 ▲64.19 ▼0.03100.35 ▼10.9646.14 ▼1.61
Syntax Highlight /wp-admin/options-general.php?page=syntax_highlight1,3122.0422.8629.50

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (**CC-Syntax-Highlight Settings** - Visit the 'Settings > Syntax Highlight' page, select your preferred options and save them.) image required
The official readme.txt is a good inspiration

cc-syntax-highlight/plugin.php 92% from 13 tests

The principal PHP file in "CC-Syntax-Highlight" v. 1.2.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cc-syntax-highlight.php" instead of "plugin.php")

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
Everything looks great! No dangerous files found in this plugin7,822 lines of code in 155 files:
LanguageFilesBlank linesComment linesLines of code
CSS1141,4188617,353
PHP39274288
JavaScript36314136
PO File1366242
SVG1003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity25.50
▷ Minimum class complexity3.00
▷ Maximum class complexity48.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes2
▷ Abstract classes150.00%
▷ Concrete classes150.00%
▷ Final classes00.00%
Methods31
▷ Static methods412.90%
▷ Public methods2477.42%
▷ Protected methods722.58%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
highlight/school-book.png0.47KB0.34KB▼ 27.37%
screenshot-1.png54.45KB19.91KB▼ 63.43%
highlight/brown-papersq.png17.77KB9.92KB▼ 44.16%
highlight/brown_papersq.png17.77KB9.92KB▼ 44.16%
highlight/school_book.png0.47KB0.34KB▼ 27.37%