83% wp-wadvisor

Code Review | Wadvisor plugin

WordPress plugin Wadvisor plugin scored 83% from 54 tests.

About plugin

  • Plugin page: wp-wadvisor
  • Plugin version: 1.0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.5.3
  • WordPress version: 5.8.1
  • First release: May 7, 2016
  • Latest release: Jul 11, 2016
  • Number of updates: 30
  • Update frequency: every 12.1 days
  • Top authors: wadvisor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 427 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼145.69ms] Passed 4 tests

A check of server-side resources used by Wadvisor plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0542.65 ▲7.76
Dashboard /wp-admin3.11 ▲0.0548.89 ▼1.36
Posts /wp-admin/edit.php3.16 ▲0.0546.40 ▲0.26
Add New Post /wp-admin/post-new.php5.47 ▲0.0494.81 ▼573.95
Media Library /wp-admin/upload.php3.05 ▲0.0431.06 ▼7.69

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 1 new option
New WordPress options
widget_wadvisor_page_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Wadvisor plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /522 ▼3,0745.22 ▼10.328.85 ▼1.6848.73 ▼1.97
Dashboard /wp-admin2,967 ▲365.91 ▼0.03140.23 ▼13.57111.46 ▼8.59
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0377.53 ▲10.8888.52 ▼1.38
Add New Post /wp-admin/post-new.php1,683 ▼018.73 ▼0.19373.95 ▼14.43104.17 ▼4.18
Media Library /wp-admin/upload.php1,810 ▲35.02 ▼0.02157.75 ▲5.62114.60 ▼6.15

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
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_wadvisor_page_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-wadvisor/widget-wadvisor.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Page Widget - Configuration example), #2 (Page Widget - Display example), #3 (Question Widget - Display example)
The official readme.txt might help

wp-wadvisor/widget-wadvisor.php 92% from 13 tests

"Wadvisor plugin" version 1.0.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-wadvisor.php" instead of "widget-wadvisor.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
No dangerous file extensions were detected249 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22350188
PO File1151750
XML10011

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity54.00
▷ Minimum class complexity54.00
▷ Maximum class complexity54.00
Average method complexity14.25
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
3 PNG files occupy 0.66MB with 0.43MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png251.20KB78.29KB▼ 68.83%
screenshot-1.png16.43KB7.35KB▼ 55.26%
screenshot-2.png409.92KB125.11KB▼ 69.48%