94% e-motion-made4ecommerce

Code Review | e-motion - Made4ecommerce

WordPress plugin e-motion - Made4ecommerce scored 94% from 54 tests.

About plugin

  • Plugin page: e-motion-made4eco...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9
  • WordPress version: 5.9.2
  • First release: Mar 24, 2017
  • Latest release: May 29, 2018
  • Number of updates: 15
  • Update frequency: every 93.4 days
  • Top authors: m4ecemotion (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active / 2,263 total downloads

Benchmarks

Plugin footprint Passed 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.00MB] [CPU: ▼295.37ms] Passed 4 tests

Server-side resources used by e-motion - Made4ecommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0352.78 ▲0.20
Dashboard /wp-admin3.43 ▲0.0233.07 ▲0.47
Posts /wp-admin/edit.php3.66 ▲0.0237.10 ▲1.65
Add New Post /wp-admin/post-new.php6.93 ▼0.0794.30 ▼1,181.95
Media Library /wp-admin/upload.php3.31 ▲0.0224.44 ▼0.20

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 27 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for e-motion - Made4ecommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5116.21 ▲0.525.69 ▼0.083.00 ▲0.47
Dashboard /wp-admin2,895 ▲346.12 ▼0.03114.52 ▼22.19153.41 ▼4.66
Posts /wp-admin/edit.php2,694 ▲33.24 ▼0.0163.88 ▲3.08137.41 ▼6.24
Add New Post /wp-admin/post-new.php1,661 ▼9116.40 ▼5.15389.92 ▼61.86151.49 ▼8.85
Media Library /wp-admin/upload.php1,698 ▼05.53 ▲0.03143.88 ▲4.30181.85 ▼6.40

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/e-motion-made4ecommerce/includes/data/data-settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/e-motion-made4ecommerce/woo-includes/woo-functions.php:74

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 93% from 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
7 plugin tags: shipping, store, e-motion, woocommerce, shop...

e-motion-made4ecommerce/e-motion-m4ec.php 85% from 13 tests

The main PHP file in "e-motion - Made4ecommerce" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("e-motion-made4ecommerce.php" instead of "e-motion-m4ec.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,268 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP14353322901
SVG505249
PO File13742118

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.83
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods38
▷ Static methods37.89%
▷ Public methods3386.84%
▷ Protected methods00.00%
▷ Private methods513.16%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
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
images/logo-emotion.png7.69KB4.23KB▼ 45.02%