84% pet-adoption-search-widget

Code Review | Pet Adoption Search Widget

WordPress plugin Pet Adoption Search Widget scored84%from 54 tests.

About plugin

  • Plugin page: pet-adoption-sear...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.8
  • WordPress version: 6.3.1
  • First release: Jan 8, 2015
  • Latest release: Jan 18, 2022
  • Number of updates: 32
  • Update frequency: every 80.2 days
  • Top authors: ChrisHardie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,663 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.45ms] Passed 4 tests

A check of server-side resources used by Pet Adoption Search Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.11 ▼0.93
Dashboard /wp-admin3.33 ▼0.0249.88 ▼14.10
Posts /wp-admin/edit.php3.38 ▲0.0248.73 ▼7.40
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.73 ▼15.36
Media Library /wp-admin/upload.php3.25 ▲0.0237.57 ▲3.48

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_pet_adoption_search_widget

Browser metrics Passed 4 tests

Checking browser requirements for Pet Adoption Search Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.44 ▲0.242.11 ▲0.2943.03 ▲0.87
Dashboard /wp-admin2,221 ▲154.85 ▼0.94104.88 ▲2.0139.31 ▼5.48
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0537.67 ▼4.7632.45 ▼6.04
Add New Post /wp-admin/post-new.php1,540 ▲1423.03 ▲5.53675.14 ▼15.1153.00 ▼2.00
Media Library /wp-admin/upload.php1,394 ▼34.22 ▼0.0797.99 ▼6.0041.14 ▼4.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_pet_adoption_search_widget
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pet-adoption-search-widget/pet-adoption-search-widget.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: animals, pets, adopt-me, adoptable pets, adoption

pet-adoption-search-widget/pet-adoption-search-widget.php Passed 13 tests

"Pet Adoption Search Widget" version 1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
63 characters long description:
Display an Adopt-a-Pet.com pet adoption search form in a widget

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
Everything looks great! No dangerous files found in this plugin62 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1265762

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.07MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png74.52KB18.03KB▼ 75.80%