10% prizma

Code Review | Prizma

WordPress plugin Prizma scored10%from 54 tests.

About plugin

  • Plugin page: prizma
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.4
  • WordPress version: 6.3.1
  • First release: Jun 15, 2015
  • Latest release: Mar 28, 2016
  • Number of updates: 55
  • Update frequency: every 5.3 days
  • Top authors: prizmavideo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,653 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/prizma/prizma-widget-sidebar.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; Prizma_Widget_Sidebar has a deprecated constructor

Server metrics [RAM: ▼1.88MB] [CPU: ▼52.84ms] Passed 4 tests

Analyzing server-side resources used by Prizma
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.366.42 ▼37.36
Dashboard /wp-admin2.13 ▼1.185.85 ▼38.78
Posts /wp-admin/edit.php2.13 ▼1.236.49 ▼41.48
Add New Post /wp-admin/post-new.php2.13 ▼3.766.46 ▼93.75
Media Library /wp-admin/upload.php2.13 ▼1.107.05 ▼26.42
Prizma Widget /wp-admin/options-general.php?page=prizma-widget-settings2.136.58

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_prizma-widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Prizma
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲8414.45 ▼0.281.84 ▼0.1039.57 ▲3.22
Dashboard /wp-admin2,220 ▲295.88 ▼0.0099.48 ▼12.9338.61 ▼6.52
Posts /wp-admin/edit.php2,097 ▲82.01 ▼0.0436.38 ▼2.5229.67 ▼7.58
Add New Post /wp-admin/post-new.php6,225 ▲4,71125.82 ▲8.04885.80 ▲278.8562.51 ▲7.99
Media Library /wp-admin/upload.php1,396 ▲84.28 ▲0.09110.24 ▲12.6748.02 ▲5.70
Prizma Widget /wp-admin/options-general.php?page=prizma-widget-settings8302.0523.9228.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/prizma/prizma-widget-sidebar.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; Prizma_Widget_Sidebar has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_prizma-widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=prizma-widget-settings
    • > Deprecated in wp-content/plugins/prizma/prizma-widget-sidebar.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; Prizma_Widget_Sidebar has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=prizma-widget-settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the prizma-spotlight-tinymce handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=prizma-widget-settings
    • > Notice in wp-content/plugins/prizma/prizma-widget-settings.php+28
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=prizma-widget-settings
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Prizma_Widget_Sidebar is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=prizma-widget-settings
    • > Notice in wp-content/plugins/prizma/prizma-widget-settings.php+47
    Undefined index: partnerID

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
Almost there! Just fix the following items
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/prizma/prizma-widget-mce.php
    • > /wp-content/plugins/prizma/prizma-widget-settings.php
    • > /wp-content/plugins/prizma/prizma-widget-sidebar.php
    • > /wp-content/plugins/prizma/prizma-widget-meta-box.php
    • > /wp-content/plugins/prizma/prizma-widget.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt might help

prizma/prizma-widget.php 85% from 13 tests

The entry point to "Prizma" version 2.1.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 141 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("prizma.php" instead of "prizma-widget.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 plugin849 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP616048646
CSS250114
JavaScript212189

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity14.50
▷ Minimum class complexity2.00
▷ Maximum class complexity39.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods47
▷ Static methods4187.23%
▷ Public methods3982.98%
▷ Protected methods00.00%
▷ Private methods817.02%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/SIDEBAR_TEXT.png0.35KB0.14KB▼ 58.77%
img/FILMSTRIP.png0.22KB0.13KB▼ 42.08%
img/SIDEBAR_TEXT_OVER.png0.33KB0.14KB▼ 56.55%
img/prizma_for_wordpress.png6.89KB4.39KB▼ 36.30%
img/prizma-spotlight-tinymce-icon.png0.34KB0.22KB▼ 37.22%