84% hiiwaterwheel

Code Review | HiiWaterwheel WordPress Plugin

WordPress plugin HiiWaterwheel WordPress Plugin scored84%from 54 tests.

About plugin

  • Plugin page: hiiwaterwheel
  • Plugin version: 0.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 3, 2018
  • Latest release: Sep 21, 2018
  • Number of updates: 15
  • Update frequency: every 11.8 days
  • Top authors: hiilite (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /837 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.82MB] [CPU: ▼2.86ms] Passed 4 tests

This is a short check of server-side resources used by HiiWaterwheel WordPress Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.5947.47 ▼0.56
Dashboard /wp-admin4.20 ▲0.8954.85 ▼4.33
Posts /wp-admin/edit.php4.28 ▲0.9257.62 ▲7.41
Add New Post /wp-admin/post-new.php6.79 ▲0.9093.44 ▼13.97
Media Library /wp-admin/upload.php4.12 ▲0.8847.05 ▲9.07
Add New /wp-admin/post-new.php?post_type=waterwheel4.5257.59
All Waterwheels /wp-admin/edit.php?post_type=waterwheel4.1744.99

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 424 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
hiiwaterwheel_version
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for HiiWaterwheel WordPress Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲15413.49 ▼0.9110.87 ▲8.7642.08 ▼0.59
Dashboard /wp-admin2,238 ▲615.68 ▲0.0792.99 ▲5.1740.49 ▲1.59
Posts /wp-admin/edit.php2,140 ▲402.06 ▲0.0538.08 ▼1.0236.08 ▲1.16
Add New Post /wp-admin/post-new.php1,558 ▲3223.04 ▲0.06714.35 ▲9.4380.04 ▲33.48
Media Library /wp-admin/upload.php1,443 ▲464.36 ▲0.1598.96 ▼32.2842.99 ▼7.97
Add New /wp-admin/post-new.php?post_type=waterwheel1,7843.6867.8646.30
All Waterwheels /wp-admin/edit.php?post_type=waterwheel1,1121.9734.9831.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • hiiwaterwheel_version
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Please take a closer look at the following
  • 59× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/hiiwaterwheel/lib/cmb2/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/hiiwaterwheel/lib/cmb2-taxonomy/plugin.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hiiwaterwheel/lib/cmb2-field-post-search-ajax/cmb-field-post-search-ajax.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller_Boxes' not found in wp-content/plugins/hiiwaterwheel/lib/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/hiiwaterwheel/lib/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/hiiwaterwheel/templates/hiiwaterwheel-basic.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hiiwaterwheel/lib/cmb2/init.php:127
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/hiiwaterwheel/lib/cmb2/includes/CMB2.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hiiwaterwheel/hiiwaterwheel-functions.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/hiiwaterwheel/lib/cmb2/includes/types/CMB2_Type_Multi_Base.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: wordpress, plugin, images, waterwheel, carousel

hiiwaterwheel/hiiwaterwheel.php Passed 13 tests

The principal PHP file in "HiiWaterwheel WordPress Plugin" v. 0.0.5 is loaded by WordPress automatically on each request
63 characters long description:
This plugin allows you create a basic waterwheel image carousel

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin47,842 lines of code in 254 files:
LanguageFilesBlank linesComment linesLines of code
PO File12013,78217,88231,544
PHP782,2766,2867,562
CSS191,1621,1705,225
JavaScript125043351,804
Sass15291251,330
Markdown51170293
JSON30066
SVG20218

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity16.70
▷ Minimum class complexity1.00
▷ Maximum class complexity175.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes79
▷ Abstract classes810.13%
▷ Concrete classes7189.87%
▷ Final classes00.00%
Methods564
▷ Static methods8715.43%
▷ Public methods47484.04%
▷ Protected methods8715.43%
▷ Private methods30.53%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants1252.17%
▷ Class constants1147.83%
▷ Public constants11100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
23 PNG files occupy 0.95MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/cmb-field-select_tagger/screenshot-3.png3.22KB3.26KB0.00%
lib/cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
assets/screenshot-3.png76.24KB21.63KB▼ 71.62%
lib/cmb-field-select_tagger/screenshot-2.png4.91KB4.88KB▼ 0.74%
lib/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%