84% woo-store-vacation

Code Review | Woo Store Vacation

WordPress plugin Woo Store Vacation scored84%from 54 tests.

About plugin

  • Plugin page: woo-store-vacation
  • Plugin version: 1.9.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4
  • WordPress version: 6.3.1
  • First release: Nov 29, 2016
  • Latest release: Nov 29, 2023
  • Number of updates: 98
  • Update frequency: every 26.1 days
  • Top authors: mahdiyazdani (100%)

Code review

54 tests

User reviews

89 reviews

Install metrics

10,000+ active /278,184 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.25ms] Passed 4 tests

Server-side resources used by Woo Store Vacation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.03 ▼8.35
Dashboard /wp-admin3.32 ▼0.0347.05 ▼10.68
Posts /wp-admin/edit.php3.37 ▲0.0151.00 ▲5.23
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.26 ▼12.92
Media Library /wp-admin/upload.php3.24 ▲0.0135.07 ▲2.97

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 100 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Woo Store Vacation
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲7614.72 ▲0.011.68 ▼0.0927.65 ▼17.77
Dashboard /wp-admin2,243 ▲655.65 ▼0.0391.66 ▼23.3747.14 ▲1.58
Posts /wp-admin/edit.php2,149 ▲492.17 ▲0.2139.96 ▲1.4241.59 ▲7.13
Add New Post /wp-admin/post-new.php1,561 ▲3523.39 ▲2.14668.13 ▼28.5657.47 ▼3.86
Media Library /wp-admin/upload.php1,451 ▲544.23 ▲0.0196.17 ▼5.0649.21 ▲4.63

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 22× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/woo-store-vacation/src/Vendor/Pimple/Tests/Psr11/ServiceLocatorTest.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Woo_Store_Vacation\\Shortcode\\Shortcode' not found in wp-content/plugins/woo-store-vacation/src/Shortcode/Notice.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/woo-store-vacation/src/Integration/Elementor/Widget.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/woo-store-vacation/src/Vendor/Pimple/Tests/PimpleTest.php:35
    • > PHP Fatal error
      Uncaught Error: Interface 'Woo_Store_Vacation\\Vendor\\Pimple\\ServiceProviderInterface' not found in wp-content/plugins/woo-store-vacation/src/Vendor/Pimple/Tests/Fixtures/PimpleServiceProvider.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/woo-store-vacation/src/Vendor/Pimple/Exception/FrozenServiceException.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/woo-store-vacation/src/Vendor/Pimple/Tests/ServiceIteratorTest.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Woo_Store_Vacation\\Settings\\Sections\\Section' not found in wp-content/plugins/woo-store-vacation/src/Settings/Sections/General.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Woo_Store_Vacation\\Vendor\\Pimple\\ServiceProviderInterface' not found in wp-content/plugins/woo-store-vacation/src/PluginServiceProvider.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Woo_Store_Vacation\\Ajax\\Ajax' not found in wp-content/plugins/woo-store-vacation/src/Ajax/Rate.php:19

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed: The official readme.txt is a good inspiration

woo-store-vacation/woo-store-vacation.php Passed 13 tests

"Woo Store Vacation" version 1.9.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
109 characters long description:
Pause your store during vacations by scheduling specific dates and display a customizable notice to visitors.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin3,991 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
PHP731,0053,1743,385
CSS6436220
JavaScript83951220
JSON100133
SVG20024
XML1009

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.90
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces22
Interfaces1
Traits0
Classes58
▷ Abstract classes712.07%
▷ Concrete classes5187.93%
▷ Final classes23.92%
Methods271
▷ Static methods2910.70%
▷ Public methods23486.35%
▷ Protected methods124.43%
▷ Private methods259.23%
Functions60
▷ Named functions23.33%
▷ Anonymous functions5896.67%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.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
No PNG files were detected