89% s2-woocommerce-ean

Code Review | s2 Woocommerce EAN

WordPress plugin s2 Woocommerce EAN scored89%from 54 tests.

About plugin

  • Plugin page: s2-woocommerce-ean
  • Plugin version: 0.1.0
  • PHP compatiblity: 5.2.17+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 27, 2020
  • Latest release: May 29, 2022
  • Number of updates: 23
  • Update frequency: every 33.4 days
  • Top authors: Sebas2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /569 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼10.11ms] Passed 4 tests

A check of server-side resources used by s2 Woocommerce EAN
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.14 ▼1.89
Dashboard /wp-admin3.36 ▲0.0151.40 ▼12.49
Posts /wp-admin/edit.php3.47 ▲0.1151.50 ▼9.31
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.94 ▼16.75
Media Library /wp-admin/upload.php3.28 ▲0.0539.69 ▲2.60

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/s2-woocommerce-ean/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for s2 Woocommerce EAN
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.67 ▲0.491.76 ▲0.0841.78 ▲0.08
Dashboard /wp-admin2,229 ▲264.95 ▼0.09139.17 ▲29.0745.97 ▼1.07
Posts /wp-admin/edit.php2,106 ▲62.02 ▼0.0339.78 ▼0.6337.17 ▲1.10
Add New Post /wp-admin/post-new.php1,557 ▲1723.02 ▼0.15628.36 ▼60.7753.22 ▼0.46
Media Library /wp-admin/upload.php1,405 ▲54.30 ▲0.08103.69 ▼16.9344.43 ▼4.16

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 does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Requires at least: Invalid plugin version format
The official readme.txt might help

s2-woocommerce-ean/s2_woocommerce_ean.php 92% from 13 tests

Analyzing the main PHP file in "s2 Woocommerce EAN" version 0.1.0
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("s2-woocommerce-ean.php" instead of "s2_woocommerce_ean.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin172 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP14043114
PO File281258

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.53
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods15100.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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin