84% wapuu-dashboard-pet

Code Review | Wapuu Dashboard Pet

WordPress plugin Wapuu Dashboard Pet scored84%from 54 tests.

About plugin

  • Plugin page: wapuu-dashboard-pet
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 28, 2018
  • Latest release: Oct 10, 2023
  • Number of updates: 29
  • Update frequency: every 63.4 days
  • Top authors: kayleighthorpe (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active /3,409 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: ▼3.58ms] Passed 4 tests

An overview of server-side resources used by Wapuu Dashboard Pet
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.13 ▲2.56
Dashboard /wp-admin3.33 ▼0.0251.75 ▼13.94
Posts /wp-admin/edit.php3.38 ▲0.0253.50 ▼0.08
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.96 ▼2.87
Media Library /wp-admin/upload.php3.25 ▲0.0236.82 ▲3.12
Wapuu Dashboard Pet /wp-admin/options-general.php?page=WDPet-options3.2836.53
Wapuu Updates /wp-admin/admin.php?page=WDPet-updates3.2535.74
Wapuu Additions /wp-admin/admin.php?page=WDPet-add3.2632.98
Wapuu Display /wp-admin/admin.php?page=WDPet-display3.2536.80

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wapuu Dashboard Pet
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4414.28 ▼0.281.79 ▲0.2945.06 ▲1.31
Dashboard /wp-admin2,199 ▲225.71 ▲0.1484.27 ▼5.8665.41 ▲23.76
Posts /wp-admin/edit.php2,104 ▲71.96 ▲0.0141.05 ▲2.1532.48 ▼5.96
Add New Post /wp-admin/post-new.php1,541 ▲622.97 ▲4.74697.14 ▲71.8055.16 ▼8.01
Media Library /wp-admin/upload.php1,401 ▲14.15 ▼0.04100.83 ▼8.0576.92 ▲32.01
Wapuu Dashboard Pet /wp-admin/options-general.php?page=WDPet-options9051.9923.7152.30
Wapuu Updates /wp-admin/admin.php?page=WDPet-updates9181.9824.5422.94
Wapuu Additions /wp-admin/admin.php?page=WDPet-add8941.9925.2725.60
Wapuu Display /wp-admin/admin.php?page=WDPet-display8382.0324.6123.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wapuu-dashboard-pet/templates/admin-page.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wapuu-dashboard-pet/templates/emailtemplate.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wapuu-dashboard-pet/wapuu-dashboard-pet.php:522
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wapuu-dashboard-pet/templates/admin-add.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wapuu-dashboard-pet/templates/admin-updates.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wapuu-dashboard-pet/templates/admin-display.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Requires at least: Version format is invalid
  • Requires php: Version format is invalid
The official readme.txt is a good inspiration

wapuu-dashboard-pet/wapuu-dashboard-pet.php Passed 13 tests

The main file in "Wapuu Dashboard Pet" v. 1.3.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
59 characters long description:
Adds a digital pet to your site who lives off your updates.

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
Good job! No executable or dangerous file extensions detected1,406 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
SVG505869
PHP6352112537

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
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.13MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/verysick.png37.77KB15.35KB▼ 59.37%
images/banner.png52.49KB21.89KB▼ 58.30%
images/sad.png8.99KB8.95KB0.47%
images/dead.png13.75KB13.68KB▼ 0.51%
images/happy.png9.72KB9.64KB▼ 0.78%