89% easy-digital-downloads-store-hours

Code Review | Easy Digital Downloads - Store Hours

WordPress plugin Easy Digital Downloads - Store Hours scored89%from 54 tests.

About plugin

  • Plugin page: easy-digital-down...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.5.3
  • WordPress version: 6.3.1
  • First release: May 29, 2014
  • Latest release: Jul 30, 2016
  • Number of updates: 7
  • Update frequency: every 113.3 days
  • Top authors: section214 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,989 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Easy Digital Downloads - Store Hours
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.73 ▲2.84
Dashboard /wp-admin3.33 ▼0.0245.63 ▼16.23
Posts /wp-admin/edit.php3.38 ▲0.0243.67 ▼1.02
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.96 ▼16.48
Media Library /wp-admin/upload.php3.25 ▲0.0238.46 ▲4.12

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Digital Downloads - Store Hours
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.69 ▲0.341.76 ▲0.0937.31 ▼8.95
Dashboard /wp-admin2,195 ▲185.51 ▼0.1486.81 ▼9.7237.78 ▼1.57
Posts /wp-admin/edit.php2,106 ▲272.02 ▲0.0239.36 ▲2.2238.73 ▲3.38
Add New Post /wp-admin/post-new.php1,539 ▲1322.92 ▼0.20606.64 ▼7.2660.22 ▼18.91
Media Library /wp-admin/upload.php1,400 ▼04.24 ▼0.05102.78 ▼7.7544.02 ▼0.86

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
Please take inspiration from this readme.txt

easy-digital-downloads-store-hours/edd-store-hours.php 85% from 13 tests

The entry point to "Easy Digital Downloads - Store Hours" version 1.1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-digital-downloads-store-hours.php" instead of "edd-store-hours.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin766 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP8155293626
CSS515477
JavaScript311463

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.00
▷ Minimum class complexity4.00
▷ Maximum class complexity27.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods981.82%
▷ Protected methods00.00%
▷ Private methods218.18%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ui-icons_21759b_256x240.png5.23KB4.11KB▼ 21.49%
assets/images/ui-icons_999999_256x240.png4.27KB4.11KB▼ 3.78%
assets/images/ui-icons_cc0000_256x240.png4.27KB4.11KB▼ 3.78%
assets/images/calendar.png1.25KB1.45KB0.00%
assets/images/ui-icons_333333_256x240.png4.27KB4.11KB▼ 3.78%