84% petfinder-listings

Code Review | List Petfinder Pets

WordPress plugin List Petfinder Pets scored84%from 54 tests.

About plugin

  • Plugin page: petfinder-listings
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Jun 13, 2012
  • Latest release: Mar 22, 2022
  • Number of updates: 51
  • Update frequency: every 70.0 days
  • Top authors: bridgetwes (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

600+ active /11,609 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼6.33ms] Passed 4 tests

This is a short check of server-side resources used by List Petfinder Pets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1635.58 ▲0.48
Dashboard /wp-admin3.45 ▲0.1546.79 ▼3.35
Posts /wp-admin/edit.php3.57 ▲0.2144.86 ▼4.51
Add New Post /wp-admin/post-new.php6.04 ▲0.1490.28 ▼17.93
Media Library /wp-admin/upload.php3.38 ▲0.1432.66 ▲0.98
List Petfinder Pets /wp-admin/options-general.php?page=petf3.3431.26

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_petfw
can_compress_scripts
Petfinder-Listings
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for List Petfinder Pets
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.06 ▼0.321.71 ▲0.1044.91 ▲8.05
Dashboard /wp-admin2,202 ▲285.63 ▲0.1096.27 ▲6.2042.22 ▼1.09
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0241.34 ▲4.0038.23 ▲2.63
Add New Post /wp-admin/post-new.php1,529 ▼1023.26 ▲5.25642.75 ▼31.9267.35 ▼4.76
Media Library /wp-admin/upload.php1,407 ▲74.19 ▼0.0595.96 ▼11.3341.66 ▼5.16
List Petfinder Pets /wp-admin/options-general.php?page=petf1,0062.1322.4626.91

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
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_petfw
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • Petfinder-Listings

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/petfinder-listings/featuredpet-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/petfinder-listings/featuredpet-widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Settings Page), #2 (Widget Settings), #3 (Excerpt of one pet from page with shortcode [shelter_list]), #4 (Widget display)
You can take inspiration from this readme.txt

petfinder-listings/petfinder-listings.php Passed 13 tests

The entry point to "List Petfinder Pets" version 1.1 is a PHP file that has certain tags in its header comment area
105 characters long description:
The List Petfinder Pets plugin takes advantage of the Petfinder API to list Shelter Pets on your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin702 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP212450669
CSS16030
JavaScript1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity64.00
▷ Minimum class complexity28.00
▷ Maximum class complexity100.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods314.29%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin