74% whippet

Code Review | Whippet

WordPress plugin Whippet scored74%from 54 tests.

About plugin

  • Plugin page: whippet
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.0.2
  • WordPress version: 6.3.1
  • First release: Jan 1, 2018
  • Latest release: Dec 30, 2018
  • Number of updates: 39
  • Update frequency: every 18.0 days
  • Top authors: Jahe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,152 total downloads

Benchmarks

Plugin footprint 65% 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.49MB] [CPU: ▼0.09ms] Passed 4 tests

A check of server-side resources used by Whippet
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.4947.71 ▲9.47
Dashboard /wp-admin3.82 ▲0.5161.48 ▲1.07
Posts /wp-admin/edit.php3.86 ▲0.5048.81 ▲1.36
Add New Post /wp-admin/post-new.php6.43 ▲0.5483.12 ▼11.42
Media Library /wp-admin/upload.php3.70 ▲0.4741.80 ▲8.62
Whippet /wp-admin/tools.php?page=whippet3.6238.22

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 27 new files
Database: 2 new tables, 8 new options
New tables
wp_whippet_enabled
wp_whippet_disabled
New WordPress options
widget_recent-comments
can_compress_scripts
whippet_db_version
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
whippet_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Whippet
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,219 ▲45814.03 ▼0.332.42 ▲0.7442.44 ▼0.33
Dashboard /wp-admin2,201 ▲275.63 ▲0.0483.81 ▼2.5836.66 ▼2.26
Posts /wp-admin/edit.php2,106 ▲61.99 ▼0.0034.26 ▼2.8036.71 ▲1.33
Add New Post /wp-admin/post-new.php1,531 ▼623.31 ▲5.19669.15 ▲59.4357.28 ▼8.89
Media Library /wp-admin/upload.php1,403 ▼04.18 ▼0.07101.58 ▲6.4741.34 ▲0.18
Whippet /wp-admin/tools.php?page=whippet1,1482.0023.2231.43

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_whippet_enabled
    • wp_whippet_disabled
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • whippet_options
    • widget_recent-comments
    • whippet_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/whippet/whippet.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

whippet/whippet.php Passed 13 tests

The entry point to "Whippet" version 1.0.1 is a PHP file that has certain tags in its header comment area
35 characters long description:
Speed up your Website using Whippet

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,427 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP83168571,815
CSS2545331
JavaScript22935228
Markdown18044
JSON1008
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity75.00
▷ Minimum class complexity22.00
▷ Maximum class complexity103.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods78
▷ Static methods2430.77%
▷ Public methods7089.74%
▷ Protected methods00.00%
▷ Private methods810.26%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.40MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png78.78KB81.29KB0.00%
assets/screenshot-1.png174.27KB181.33KB0.00%
assets/screenshot-2.png99.45KB103.44KB0.00%
assets/screenshot-4.png54.50KB57.50KB0.00%