68% profitori

Code Review | The E-Commerce ERP: Purchasing, Inventory, Fulfillment, Manufacturing, BOM, Accounting, Sales Analysis

WordPress plugin The E-Commerce ERP: Purchasing, Inventory, Fulfillment, Manufacturing, BOM, Accounting, Sales Analysis scored68%from 54 tests.

About plugin

  • Plugin page: profitori
  • Plugin version: 2.1.0.9
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.1
  • WordPress version: 6.3.1
  • First release: May 2, 2020
  • Latest release: Dec 5, 2022
  • Number of updates: 302
  • Update frequency: every 3.2 days
  • Top authors: pau1andrews (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /30,171 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.98MB] [CPU: ▼0.74ms] Passed 4 tests

A check of server-side resources used by The E-Commerce ERP: Purchasing, Inventory, Fulfillment, Manufacturing, BOM, Accounting, Sales Analysis
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.45 ▲0.9946.56 ▲5.24
Dashboard /wp-admin4.31 ▲1.0149.07 ▼6.78
Posts /wp-admin/edit.php4.36 ▲1.0154.68 ▲5.75
Add New Post /wp-admin/post-new.php6.86 ▲0.9795.28 ▼7.18
Media Library /wp-admin/upload.php4.18 ▲0.9542.82 ▲7.21

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 336 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for The E-Commerce ERP: Purchasing, Inventory, Fulfillment, Manufacturing, BOM, Accounting, Sales Analysis
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▲0.151.70 ▼0.0243.48 ▼4.56
Dashboard /wp-admin2,195 ▲185.63 ▲0.0191.99 ▼10.1242.71 ▼6.87
Posts /wp-admin/edit.php2,103 ▲62.02 ▲0.0140.61 ▲2.6236.17 ▲2.79
Add New Post /wp-admin/post-new.php1,531 ▼1423.37 ▼0.12651.57 ▼8.8755.03 ▼1.14
Media Library /wp-admin/upload.php1,403 ▲94.31 ▲0.0298.91 ▼12.9945.17 ▼1.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/profitori/widget/src/lang/cvtES.php
    • > /wp-content/plugins/profitori/widget/src/lang/cvtZH.php
    • > /wp-content/plugins/profitori/includes/enqueue.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      file_get_contents(ZH.manual.json): failed to open stream: No such file or directory in wp-content/plugins/profitori/widget/src/lang/cvtZH.php on line 27
    • > PHP Warning
      file_get_contents(ES.csv): failed to open stream: No such file or directory in wp-content/plugins/profitori/widget/src/lang/cvtES.php on line 27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/profitori/profitori.php:20
    • > PHP Warning
      file_get_contents(ZH.dummy.json): failed to open stream: No such file or directory in wp-content/plugins/profitori/widget/src/lang/cvtZH.php on line 27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Tags: There are too many tags (28 tag instead of maximum 10)
You can look at the official readme.txt

profitori/profitori.php 92% from 13 tests

This is the main PHP file of "The E-Commerce ERP: Purchasing, Inventory, Fulfillment, Manufacturing, BOM, Accounting, Sales Analysis" version 2.1.0.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "3.8")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Please make sure to remedy the following
  • Do not distribute dangerous files with your plugin
    • .out - Executable in Linux
      • wp-content/plugins/profitori/widget/src/lang/tx.out
64,157 lines of code in 292 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2625,0631,00948,696
JSON17108,316
PHP54692136,243
CSS418214880
HTML252020
Bourne Shell1001
SVG1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity671.00
▷ Minimum class complexity671.00
▷ Maximum class complexity671.00
Average method complexity4.39
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods195
▷ Static methods00.00%
▷ Public methods195100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions216
▷ Named functions21298.15%
▷ Anonymous functions41.85%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
28 PNG files occupy 0.27MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
widget/src/specs/images/profitori_logo_46x34.png0.57KB0.30KB▼ 47.17%
images/mono16x16.png0.39KB0.39KB▼ 0.99%
widget/src/specs/images/btnback2.png5.46KB7.97KB0.00%
widget/src/specs/images/banner-332x86.png7.26KB3.81KB▼ 47.49%
widget/src/specs/images/btnback.png5.62KB8.08KB0.00%