84% pet-adoption-listings

Code Review | Pet Adoption Listings

WordPress plugin Pet Adoption Listings scored84%from 54 tests.

About plugin

  • Plugin page: pet-adoption-list...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.0
  • WordPress version: 6.3.1
  • First release: Feb 1, 2015
  • Latest release: Jun 26, 2022
  • Number of updates: 34
  • Update frequency: every 79.5 days
  • Top authors: ChrisHardie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,748 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.11ms] Passed 4 tests

Analyzing server-side resources used by Pet Adoption Listings
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.69 ▼4.78
Dashboard /wp-admin3.35 ▲0.0444.64 ▼2.71
Posts /wp-admin/edit.php3.40 ▲0.0447.30 ▲1.08
Add New Post /wp-admin/post-new.php5.93 ▲0.0481.24 ▼19.84
Media Library /wp-admin/upload.php3.27 ▲0.0432.84 ▼1.12

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_pet_adoption_listings_widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

Pet Adoption Listings: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.131.56 ▼0.1641.28 ▼6.79
Dashboard /wp-admin2,206 ▲185.86 ▲0.98103.69 ▼9.8340.50 ▼6.85
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0339.05 ▲4.9135.90 ▼0.96
Add New Post /wp-admin/post-new.php1,533 ▼123.24 ▼0.24661.19 ▲11.0760.97 ▲16.45
Media Library /wp-admin/upload.php1,391 ▼04.20 ▲0.0098.07 ▼4.5543.80 ▲3.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_pet_adoption_listings_widget
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pet-adoption-listings/pet-adoption-listings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: adoption, adoptable pets, pets, animals

pet-adoption-listings/pet-adoption-listings.php Passed 13 tests

"Pet Adoption Listings" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
65 characters long description:
Display adoptable pets from an Adopt-a-Pet.com shelter's listings

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin149 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14264149

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity11.00
▷ Minimum class complexity5.00
▷ Maximum class complexity17.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.31MB with 0.22MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png41.09KB13.62KB▼ 66.86%
screenshot-4.png92.40KB24.97KB▼ 72.97%
screenshot-3.png50.59KB14.51KB▼ 71.31%
screenshot-2.png131.21KB34.85KB▼ 73.44%