84% ai-code-highlighter

Code Review | AI Code Highlight

WordPress plugin AI Code Highlight scored84%from 54 tests.

About plugin

  • Plugin page: ai-code-highlighter
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Jan 29, 2014
  • Latest release: Jan 29, 2014
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: andreiionescu (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,313 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.22ms] Passed 4 tests

This is a short check of server-side resources used by AI Code Highlight
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.47 ▼1.80
Dashboard /wp-admin3.32 ▲0.0154.28 ▲0.78
Posts /wp-admin/edit.php3.37 ▲0.0152.64 ▼2.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.00 ▼12.98
Media Library /wp-admin/upload.php3.24 ▲0.0142.11 ▲6.81

Server storage [IO: ▲0.40MB] [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: 38 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AI Code Highlight
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲8414.33 ▼0.0217.88 ▲15.3047.32 ▲2.14
Dashboard /wp-admin2,198 ▲215.61 ▼0.0485.78 ▼12.7840.25 ▼3.42
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0433.71 ▼4.4234.74 ▼1.69
Add New Post /wp-admin/post-new.php1,526 ▼023.65 ▲0.55672.17 ▼26.2754.97 ▼10.49
Media Library /wp-admin/upload.php1,394 ▼34.20 ▼0.1797.87 ▼10.4845.15 ▲1.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 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/ai-code-highlighter/ai-code-highliter.php:30

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


Plugin configuration 93% from 29 tests

readme.txt Passed 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
1 plugin tags: code highlight

ai-code-highlighter/ai-code-highliter.php 85% from 13 tests

The primary PHP file in "AI Code Highlight" version 1.3 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 148 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ai-code-highlighter.php" instead of "ai-code-highliter.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
Everything looks great! No dangerous files found in this plugin6,596 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/ai-code-highliter.png7.41KB3.29KB▼ 55.52%