84% precise-sales-for-woocommerce

Code Review | Precise Sales for WooCommerce

WordPress plugin Precise Sales for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: precise-sales-for...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9.1-6.0
  • WordPress version: 6.3.1
  • First release: Sep 14, 2022
  • Latest release: Sep 14, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: devpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /838 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▲0.16ms] Passed 4 tests

A check of server-side resources used by Precise Sales for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0345.63 ▲3.59
Dashboard /wp-admin3.34 ▲0.0347.72 ▼0.33
Posts /wp-admin/edit.php3.39 ▲0.0347.71 ▼4.06
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.62 ▲1.98
Media Library /wp-admin/upload.php3.26 ▲0.0337.23 ▲3.06

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Precise Sales for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.68 ▲0.311.61 ▼0.5140.96 ▼7.71
Dashboard /wp-admin2,195 ▲155.51 ▼0.1889.30 ▼0.9443.59 ▲0.47
Posts /wp-admin/edit.php2,103 ▼01.97 ▼0.0339.87 ▼1.0136.54 ▼2.57
Add New Post /wp-admin/post-new.php1,526 ▼023.10 ▼0.16649.70 ▼50.3155.50 ▼7.24
Media Library /wp-admin/upload.php1,397 ▼34.19 ▼0.08100.54 ▲0.0544.08 ▼1.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/precise-sales-for-woocommerce/precise-sales-for-woocommerce.php:50

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: sales, woocommerce

precise-sales-for-woocommerce/precise-sales-for-woocommerce.php 92% from 13 tests

The entry point to "Precise Sales for WooCommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("6.0" instead of "5.9.1")

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
No dangerous file extensions were detected196 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14264196

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/screenshot-1.png111.10KB30.00KB▼ 73.00%
.wordpress-org/icon-128x128.png10.52KB4.16KB▼ 60.47%
.wordpress-org/icon-256x256.png22.55KB8.11KB▼ 64.05%