84% e-stock-manager

Code Review | e-Stock Manager

WordPress plugin e-Stock Manager scored84%from 54 tests.

About plugin

  • Plugin page: e-stock-manager
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.18-6.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2023
  • Latest release: Jan 18, 2023
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: magnic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /168 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.01MB] [CPU: ▼5.74ms] Passed 4 tests

Server-side resources used by e-Stock Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.40 ▲0.59
Dashboard /wp-admin3.31 ▼0.0459.56 ▼6.79
Posts /wp-admin/edit.php3.36 ▲0.0049.08 ▼3.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.30 ▼8.90
Media Library /wp-admin/upload.php3.23 ▲0.0035.18 ▼3.55

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for e-Stock Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▲0.071.66 ▼0.0541.86 ▼0.85
Dashboard /wp-admin2,195 ▲185.53 ▲0.0186.37 ▼6.3434.77 ▼5.95
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0832.86 ▼5.5634.88 ▼2.58
Add New Post /wp-admin/post-new.php1,526 ▼023.15 ▼0.04668.37 ▼16.1259.38 ▼4.36
Media Library /wp-admin/upload.php1,400 ▲34.18 ▼0.0194.31 ▼9.5340.86 ▼2.84

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/e-stock-manager/views/index.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/e-stock-manager/views/login_register.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/e-stock-manager/views/integration.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/e-stock-manager/views/integration.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/e-stock-manager/views/edit_domain.php:12
    • > PHP Notice
      Undefined variable: pageParams in wp-content/plugins/e-stock-manager/views/integration.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/e-stock-manager/views/integration.php:6
    • > PHP Notice
      Undefined variable: pageParams in wp-content/plugins/e-stock-manager/views/settings.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/e-stock-manager/views/estock_users.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/e-stock-manager/views/pay.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
No tags were detected

e-stock-manager/e-stock-manager.php Passed 13 tests

The primary PHP file in "e-Stock Manager" version 1.0.3 is used by WordPress to initiate all plugin functionality
72 characters long description:
Integration for e-Stock Manager App allowing control stocks in real time

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin2,048 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP171602191,568
CSS139191
PO File100160
JavaScript12036129

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity12.86
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods1548.39%
▷ Public methods2993.55%
▷ Protected methods26.45%
▷ Private methods00.00%
Functions40
▷ Named functions3690.00%
▷ Anonymous functions410.00%
Constants29
▷ Global constants29100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/external_icon.png5.58KB2.51KB▼ 55.08%