84% prism-highlight

Code Review | Prism Highlight

WordPress plugin Prism Highlight scored84%from 54 tests.

About plugin

  • Plugin page: prism-highlight
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.9
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Feb 9, 2022
  • Number of updates: 24
  • Update frequency: every 97.8 days
  • Top authors: masoodalam51 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,261 total downloads

Benchmarks

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: ▼2.75ms] Passed 4 tests

Analyzing server-side resources used by Prism Highlight
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.78 ▲1.61
Dashboard /wp-admin3.31 ▲0.0148.98 ▼9.41
Posts /wp-admin/edit.php3.36 ▲0.0153.81 ▲3.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.06 ▼6.53
Media Library /wp-admin/upload.php3.23 ▲0.0140.66 ▲3.75

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Prism Highlight
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3513.64 ▼1.088.46 ▲6.6740.03 ▼5.52
Dashboard /wp-admin2,198 ▲185.66 ▼0.0188.59 ▲1.1037.60 ▼3.84
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0737.47 ▼1.0937.72 ▼1.84
Add New Post /wp-admin/post-new.php1,528 ▲223.65 ▲0.04644.52 ▼63.6551.10 ▼0.58
Media Library /wp-admin/upload.php1,400 ▲34.18 ▲0.0094.37 ▼22.0242.36 ▼5.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/prism-highlight/prism-highlight.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: There are too many tags (18 tag instead of maximum 10)
You can take inspiration from this readme.txt

prism-highlight/prism-highlight.php Passed 13 tests

"Prism Highlight" version 1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
36 characters long description:
Highlight your code using Prism.JS .

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected159 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS1259132
PHP262919
JavaScript1028

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin