84% petpress

Code Review | PetPress

WordPress plugin PetPress scored84%from 54 tests.

About plugin

  • Plugin page: petpress
  • Plugin version: 1.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 14, 2022
  • Latest release: Sep 16, 2023
  • Number of updates: 24
  • Update frequency: every 25.4 days
  • Top authors: brygs (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /1,299 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.66ms] Passed 4 tests

An overview of server-side resources used by PetPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.40 ▲1.40
Dashboard /wp-admin3.33 ▲0.0346.08 ▼0.04
Posts /wp-admin/edit.php3.38 ▲0.0346.44 ▼5.25
Add New Post /wp-admin/post-new.php5.91 ▲0.0391.40 ▼2.74
Media Library /wp-admin/upload.php3.26 ▲0.0336.24 ▲1.67
PetPress /wp-admin/options-general.php?page=petpress-plugin3.2233.48

Server storage [IO: ▲0.16MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: 3 new tables, 6 new options
New tables
wp_petpress_strays
wp_petpress_sites
wp_petpress_animals
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

PetPress: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲7213.25 ▼0.941.92 ▲0.0444.47 ▼6.20
Dashboard /wp-admin2,213 ▲254.88 ▼1.02107.53 ▼0.6937.63 ▼4.19
Posts /wp-admin/edit.php2,096 ▲282.06 ▲0.0139.86 ▲1.6037.17 ▼1.68
Add New Post /wp-admin/post-new.php1,545 ▲2618.59 ▼4.64602.71 ▼78.3151.32 ▼4.00
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.0194.56 ▼17.1340.66 ▼8.39
PetPress /wp-admin/options-general.php?page=petpress-plugin1,1432.0325.0839.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/petpress/petpress.php:1116

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% 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:
  • Donate link: Invalid URI found ("paypal.me/airdriemedia")
You can look at the official readme.txt

petpress/petpress.php 92% from 13 tests

The entry point to "PetPress" version 1.5 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 389 characters long)

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
There were no executable files found in this plugin2,532 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24702742,402
CSS1316130

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.03
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods72
▷ Static methods00.00%
▷ Public methods72100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions87
▷ Named functions87100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/foster.png8.25KB3.18KB▼ 61.51%
includes/images/adoption-pending.png9.11KB3.33KB▼ 63.42%
includes/images/sponsored-pet.png7.81KB3.04KB▼ 61.13%
includes/images/video.png2.41KB0.93KB▼ 61.42%
includes/images/AirdrieMedia50.png6.44KB3.59KB▼ 44.17%