53% sports-address-book

Code Review | Address Book

WordPress plugin Address Book scored53%from 54 tests.

About plugin

  • Plugin page: sports-address-book
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.3
  • WordPress version: 6.3.1
  • First release: Feb 27, 2017
  • Latest release: May 30, 2020
  • Number of updates: 12
  • Update frequency: every 98.8 days
  • Top authors: creativform (83.33%)ivijanstefan (25%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,749 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.63MB] [CPU: ▼39.05ms] Passed 4 tests

An overview of server-side resources used by Address Book
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.33 ▼0.1319.53 ▼21.72
Dashboard /wp-admin3.38 ▲0.0823.27 ▼31.31
Posts /wp-admin/edit.php3.39 ▲0.0319.29 ▼26.85
Add New Post /wp-admin/post-new.php3.38 ▼2.5020.78 ▼76.32
Media Library /wp-admin/upload.php3.38 ▲0.1625.44 ▼13.53
Address Book /wp-admin/edit.php?post_type=address-book3.3925.14
Add Address /wp-admin/post-new.php?post_type=address-book3.3927.11
Sports /wp-admin/edit-tags.php?taxonomy=sport&post_type=address-book3.3920.36
Cities /wp-admin/edit-tags.php?taxonomy=city&post_type=address-book3.3922.53
Institutions /wp-admin/edit-tags.php?taxonomy=institution&post_type=address-book3.3921.69
Settings /wp-admin/edit.php?post_type=address-book&page=options3.3922.85

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Address Book
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,086 ▲30015.26 ▲0.966.26 ▲4.0643.01 ▼5.21
Dashboard /wp-admin2,406 ▲2036.44 ▲0.41131.87 ▲11.6137.98 ▼6.13
Posts /wp-admin/edit.php2,308 ▲2483.54 ▲1.4949.63 ▲10.3330.11 ▼3.73
Add New Post /wp-admin/post-new.php1,761 ▲21322.51 ▼0.72653.78 ▼12.3429.21 ▼39.05
Media Library /wp-admin/upload.php1,448 ▲484.19 ▼0.2593.91 ▼20.2248.51 ▼2.25
Address Book /wp-admin/edit.php?post_type=address-book1,2923.3553.7333.42
Add Address /wp-admin/post-new.php?post_type=address-book2,6497.74190.8582.90
Sports /wp-admin/edit-tags.php?taxonomy=sport&post_type=address-book1,4883.2144.3030.65
Cities /wp-admin/edit-tags.php?taxonomy=city&post_type=address-book1,4853.0944.4830.16
Institutions /wp-admin/edit-tags.php?taxonomy=institution&post_type=address-book1,4883.1350.9631.84
Settings /wp-admin/edit.php?post_type=address-book&page=options1,2793.1144.7361.61

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/sports-address-book/include/metabox/init.php+746
    count(): Parameter must be an array or an object that implements Countable
  • Incomplete uninstall procedure, leaving 41 files (0.45MB) in the plugin directory
    • (new file) assets/index.php
    • (new file) assets/js/debounce.js
    • (new file) include/index.php
    • (new file) assets/css/sports-address-book-admin.css
    • (new file) images/noimage.png
    • (new file) assets/css/sports-address-book.css
    • (new file) assets/js/category-filter.js
    • (new file) LICENSE.txt
    • (new file) include/metabox/helpers/cmb_Meta_Box_Sanitize.php
    • (new file) assets/js/sports-address-book.js
    • ...
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=address-book&page=options
    • > Warning in wp-content/plugins/sports-address-book/include/metabox/init.php+746
    count(): Parameter must be an array or an object that implements Countable

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sports-address-book/sports-address-book.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/sports-address-book/include/metabox/init.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sports-address-book/include/sports-address-book-options.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: search, institution, address book, address, sport...

sports-address-book/sports-address-book.php Passed 13 tests

"Address Book" version 1.1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
90 characters long description:
Simple address book plugin for easy search of the sport clubs, schools, institutions, etc.

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
Everything looks great! No dangerous files found in this plugin7,030 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP109551,7993,944
JavaScript73435772,268
CSS48321818

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity85.44
▷ Minimum class complexity20.00
▷ Maximum class complexity160.00
Average method complexity5.13
▷ Minimum method complexity1.00
▷ Maximum method complexity96.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods184
▷ Static methods3418.48%
▷ Public methods16489.13%
▷ Protected methods137.07%
▷ Private methods73.80%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.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
15 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/metabox/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
include/metabox/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
include/metabox/images/ico-delete.png0.70KB0.72KB0.00%
include/metabox/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
include/metabox/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%