90% posts-and-products-statistics-for-woocommerce

Code Review | Posts and Products Statistics For WooCommerce

WordPress plugin Posts and Products Statistics For WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: posts-and-product...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 18, 2021
  • Latest release: Jul 20, 2023
  • Number of updates: 16
  • Update frequency: every 55.1 days
  • Top authors: smusman98 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /812 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.16ms] Passed 4 tests

An overview of server-side resources used by Posts and Products Statistics For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.14 ▼1.89
Dashboard /wp-admin3.36 ▲0.0645.96 ▼6.17
Posts /wp-admin/edit.php3.48 ▲0.1247.25 ▲1.81
Add New Post /wp-admin/post-new.php5.94 ▲0.0683.61 ▼18.40
Media Library /wp-admin/upload.php3.28 ▲0.0634.64 ▲1.82

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Posts and Products Statistics For WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲14613.78 ▼0.578.61 ▲6.9940.75 ▲0.63
Dashboard /wp-admin2,218 ▲405.76 ▲0.0485.76 ▼18.7376.93 ▲34.45
Posts /wp-admin/edit.php2,136 ▲362.26 ▲0.2436.34 ▲3.5934.49 ▼2.52
Add New Post /wp-admin/post-new.php1,545 ▲1023.78 ▲5.63721.66 ▲75.3460.38 ▲0.16
Media Library /wp-admin/upload.php1,423 ▲234.49 ▲0.33101.36 ▲0.3673.21 ▲26.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output 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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: The official readme.txt might help

posts-and-products-statistics-for-woocommerce/posts-and-products-statistics-for-woocommerce.php Passed 13 tests

Analyzing the main PHP file in "Posts and Products Statistics For WooCommerce" version 1.0
114 characters long description:
Posts and Products Statistics Counter for WooCommerce, Track your daily Products and Posts Views by Looking Graph.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,257 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2616953
PHP370142278
Markdown19022
CSS1004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/admin-icon.png0.51KB0.50KB▼ 0.77%