78% smart-reporter-for-wp-e-commerce

Code Review | Smart Reporter For WooCommerce and WP eCommerce

WordPress plugin Smart Reporter For WooCommerce and WP eCommerce scored78%from 54 tests.

About plugin

  • Plugin page: smart-reporter-fo...
  • Plugin version: 2.10.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Jun 10, 2011
  • Latest release: Jul 11, 2019
  • Number of updates: 139
  • Update frequency: every 21.3 days
  • Top authors: niravmehta (61.87%)ratnakar.dubey (33.09%)storeapps (6.47%)

Code review

54 tests

User reviews

18 reviews

Install metrics

700+ active /69,291 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.36MB] [CPU: ▼7.41ms] Passed 4 tests

An overview of server-side resources used by Smart Reporter For WooCommerce and WP eCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3736.79 ▼0.03
Dashboard /wp-admin3.67 ▲0.3347.69 ▼16.17
Posts /wp-admin/edit.php3.79 ▲0.4352.27 ▲0.37
Add New Post /wp-admin/post-new.php6.25 ▲0.3787.64 ▼13.79
Media Library /wp-admin/upload.php3.59 ▲0.3738.86 ▲2.69
🔥 Go Pro /wp-admin/admin.php?page=smart-reporter-pricing3.5733.04
Smart Reporter /wp-admin/admin.php?page=smart-reporter3.5630.89

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 399 new files
Database: no new tables, 11 new options
New WordPress options
sr_old_data_sync
sr_what_to_refresh
widget_theysaidso_widget
widget_recent-posts
sr_data_sync
can_compress_scripts
sr_is_auto_refresh
theysaidso_admin_options
sr_refresh_duration
widget_recent-comments
...

Browser metrics Passed 4 tests

Smart Reporter For WooCommerce and WP eCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲12113.33 ▼1.251.48 ▼0.1839.91 ▼2.00
Dashboard /wp-admin2,297 ▲1124.90 ▼0.95109.48 ▲7.9345.14 ▲5.97
Posts /wp-admin/edit.php2,156 ▲672.05 ▲0.0240.21 ▲3.7442.09 ▲5.26
Add New Post /wp-admin/post-new.php1,575 ▲5623.51 ▲0.43671.00 ▼5.0556.91 ▼4.08
Media Library /wp-admin/upload.php1,450 ▲624.35 ▲0.0496.22 ▼19.1446.09 ▼2.04
🔥 Go Pro /wp-admin/admin.php?page=smart-reporter-pricing9102.2025.7672.23
Smart Reporter /wp-admin/admin.php?page=smart-reporter8211.7223.0429.77

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 11 options
    • sr_refresh_duration
    • sr_old_data_sync
    • sr_data_sync
    • sr_what_to_refresh
    • theysaidso_admin_options
    • widget_recent-comments
    • sr_is_auto_refresh
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=smart-reporter
    • > Warning in wp-includes/pluggable.php+1438
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/smart-reporter-for-wp-e-commerce/smart-reporter.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Requires php: Version not formatted correctly
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

smart-reporter-for-wp-e-commerce/smart-reporter.php 92% from 13 tests

The main PHP script in "Smart Reporter For WooCommerce and WP eCommerce" version 2.10.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("smart-reporter-for-wp-e-commerce.php" instead of "smart-reporter.php")

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 plugin10,511 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP51,9917646,159
CSS63361411,638
JavaScript796831,381
LESS131931919
SVG100414

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions81
▷ Named functions7997.53%
▷ Anonymous functions22.47%
Constants55
▷ Global constants55100.00%
▷ Class constants00.00%
▷ Public constants00.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
24 PNG files occupy 0.16MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/themes/images/default/grid/cell-special-selected-bg.png0.13KB0.16KB0.00%
resources/themes/images/default/grid/dd-insert-arrow-left.png0.34KB0.34KB0.00%
pricing/putler-pricing.png136.92KB43.78KB▼ 68.02%
resources/themes/images/sales_funnel_200.png2.71KB2.91KB0.00%
resources/themes/images/woo_default_image.png1.63KB1.47KB▼ 9.74%