90% prismatic

Code Review |

WordPress plugin scored90%from 54 tests.

About plugin

  • Plugin page: prismatic
  • Plugin version: 3.4
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Oct 24, 2016
  • Latest release: Jul 12, 2023
  • Number of updates: 60
  • Update frequency: every 40.9 days
  • Top authors: specialk (100%)

Code review

54 tests

User reviews

42 reviews

Install metrics

2,000+ active /63,788 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.33MB] [CPU: ▼2.77ms] Passed 4 tests

An overview of server-side resources used by
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3237.09 ▼5.00
Dashboard /wp-admin3.63 ▲0.3348.77 ▲0.19
Posts /wp-admin/edit.php3.74 ▲0.3948.92 ▲0.68
Add New Post /wp-admin/post-new.php6.21 ▲0.3384.45 ▼4.59
Media Library /wp-admin/upload.php3.56 ▲0.3335.13 ▼1.66
Prismatic /wp-admin/options-general.php?page=prismatic3.5234.35

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 232 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.80 ▲0.241.63 ▲0.0241.36 ▼1.20
Dashboard /wp-admin2,207 ▲194.90 ▼1.00101.73 ▲3.0641.41 ▼3.70
Posts /wp-admin/edit.php2,090 ▲12.06 ▲0.0637.13 ▼4.2933.87 ▼1.45
Add New Post /wp-admin/post-new.php1,536 ▲323.25 ▲0.02671.53 ▼26.3353.79 ▼0.42
Media Library /wp-admin/upload.php1,386 ▼24.20 ▼0.0396.06 ▼14.7842.27 ▼4.68
Prismatic /wp-admin/options-general.php?page=prismatic8692.0438.3150.13

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% 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:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

prismatic/prismatic.php Passed 13 tests

The main PHP script in "" version 3.4 is automatically included on every request by WordPress
80 characters long description:
Display beautiful syntax-highlighted code snippets with Prism.js or Highlight.js

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin5,146 lines of code in 208 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript82132162,613
PHP15847631,606
SVG200752
CSS10919294175

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods16
▷ Static methods637.50%
▷ Public methods1487.50%
▷ Protected methods00.00%
▷ Private methods212.50%
Functions65
▷ Named functions65100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
lib/highlight/css/brown-papersq.png17.77KB9.92KB▼ 44.16%