83% wp-spritz

Code Review | WP Spritz

WordPress plugin WP Spritz scored83%from 54 tests.

About plugin

  • Plugin page: wp-spritz
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Feb 1, 2015
  • Latest release: Feb 1, 2015
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: rlaurent (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /704 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by WP Spritz
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.89 ▼1.73
Dashboard /wp-admin3.31 ▲0.0147.03 ▲0.11
Posts /wp-admin/edit.php3.36 ▲0.0141.44 ▼4.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.51 ▼11.44
Media Library /wp-admin/upload.php3.23 ▲0.0135.21 ▲1.26

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP Spritz
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲7814.77 ▲0.386.05 ▲4.1141.55 ▲0.74
Dashboard /wp-admin2,222 ▲375.80 ▼0.10101.22 ▼0.4539.78 ▼1.41
Posts /wp-admin/edit.php2,105 ▲372.04 ▲0.0534.12 ▼0.4535.03 ▲2.67
Add New Post /wp-admin/post-new.php1,555 ▲1918.35 ▼4.78592.07 ▼79.9750.00 ▼6.22
Media Library /wp-admin/upload.php1,398 ▲134.22 ▲0.0993.00 ▼7.8241.34 ▼1.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 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/wp-spritz/wpspritz.php:19

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 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (screenshot-1.jpg)
Please take inspiration from this readme.txt

wp-spritz/wpspritz.php 85% from 13 tests

Analyzing the main PHP file in "WP Spritz" version 1.0
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 259 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-spritz.php" instead of "wpspritz.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
Good job! No executable or dangerous file extensions detected109 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1192664
HTML13030
CSS11015

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.12
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png14.23KB5.33KB▼ 62.53%