94% wp-syntaxhighlighter-theme

Code Review | WP SyntaxHighlighter Theme Advance

WordPress plugin WP SyntaxHighlighter Theme Advance scored 94% from 53 tests.

About plugin

  • Plugin page: wp-syntaxhighligh...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 5.8.1
  • First release: Sep 10, 2014
  • Latest release: Sep 17, 2014
  • Number of updates: 10
  • Update frequency: every 0.7 days
  • Top authors: nguyenvanduocit (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 878 total downloads

Benchmarks

Plugin footprint Passed 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.13MB] [CPU: ▼283.24ms] Passed 4 tests

Server-side resources used by WP SyntaxHighlighter Theme Advance
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0228.65 ▼4.66
Dashboard /wp-admin2.99 ▼0.0626.15 ▼8.44
Posts /wp-admin/edit.php3.04 ▼0.0632.09 ▼10.23
Add New Post /wp-admin/post-new.php5.05 ▼0.3777.39 ▼1,109.63
Media Library /wp-admin/upload.php2.99 ▼0.0126.30 ▼3.42

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP SyntaxHighlighter Theme Advance
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,713 ▲13115.95 ▲0.278.10 ▲0.6444.55 ▼6.77
Dashboard /wp-admin2,970 ▲1176.09 ▲0.23134.75 ▼1.5796.92 ▼5.99
Posts /wp-admin/edit.php2,712 ▲62.69 ▲0.0161.78 ▼4.6492.50 ▲2.26
Add New Post /wp-admin/post-new.php1,860 ▲719.12 ▲0.06356.45 ▼9.67100.66 ▼5.48
Media Library /wp-admin/upload.php1,786 ▲145.04 ▲0.03147.73 ▼1.61110.61 ▼4.67

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'scbAdminPage' not found in wp-content/plugins/wp-syntaxhighlighter-theme/scb/BoxesPage.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-syntaxhighlighter-theme/scb/Widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-syntaxhighlighter-theme/scb/load.php:32

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

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Add theme on SyntaxHighLight Setting page), #2 (Look)
You can take inspiration from this readme.txt

wp-syntaxhighlighter-theme/wp-sht.php 92% from 13 tests

The entry point to "WP SyntaxHighlighter Theme Advance" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-syntaxhighlighter-theme.php" instead of "wp-sht.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected2,028 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP155877631,598
CSS1810408
JSON10022

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity9.92
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes23
▷ Abstract classes521.74%
▷ Concrete classes1878.26%
▷ Final classes00.00%
Methods177
▷ Static methods5732.20%
▷ Public methods13877.97%
▷ Protected methods2815.82%
▷ Private methods116.21%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.22MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png188.65KB67.03KB▼ 64.47%
screenshot-2.png36.79KB8.94KB▼ 75.70%