90% ah-prism-syntax-highlighter

Code Review | AH Code Highlighter

WordPress plugin AH Code Highlighter scored90%from 54 tests.

About plugin

  • Plugin page: ah-prism-syntax-h...
  • Plugin version: 2.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.0.0
  • WordPress version: 6.3.1
  • First release: Jan 13, 2017
  • Latest release: Aug 27, 2018
  • Number of updates: 136
  • Update frequency: every 4.3 days
  • Top authors: AHecht (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,470 total downloads


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.05MB] [CPU: ▲1.30ms] Passed 4 tests

An overview of server-side resources used by AH Code Highlighter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.93 ▼1.26
Dashboard /wp-admin3.35 ▲0.0554.90 ▲3.46
Posts /wp-admin/edit.php3.41 ▲0.0553.86 ▲7.17
Add New Post /wp-admin/post-new.php5.94 ▲0.0598.03 ▼3.66
Media Library /wp-admin/upload.php3.28 ▲0.0541.89 ▲6.65
AH Code Highlighter /wp-admin/options-general.php?page=prism3.2533.33

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for AH Code Highlighter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9316.92 ▲2.4011.25 ▲9.5438.63 ▼1.75
Dashboard /wp-admin2,208 ▲395.84 ▲0.16100.28 ▼1.6139.88 ▼3.25
Posts /wp-admin/edit.php2,111 ▲112.41 ▲0.3850.27 ▲13.6634.82 ▼3.41
Add New Post /wp-admin/post-new.php1,536 ▼123.42 ▲5.41691.59 ▲35.0637.48 ▼24.66
Media Library /wp-admin/upload.php1,411 ▲114.37 ▲0.22110.95 ▲9.6946.54 ▲0.78
AH Code Highlighter /wp-admin/options-general.php?page=prism9242.0536.9529.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: prism, code, syntax highlighter, syntax highlighting, code highlighter...

ah-prism-syntax-highlighter/load-prism.php 92% from 13 tests

The entry point to "AH Code Highlighter" version 2.0.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ah-prism-syntax-highlighter.php" instead of "load-prism.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
There were no executable files found in this plugin2,818 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods111.11%
▷ Public methods777.78%
▷ Protected methods00.00%
▷ Private methods222.22%
▷ Named functions7100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin