78% imacprestashop

Code Review | imacPrestashop

WordPress plugin imacPrestashop scored78%from 54 tests.

About plugin

  • Plugin page: imacprestashop
  • Plugin version: 2.0.17
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 6.3.1
  • First release: Jun 21, 2017
  • Latest release: Aug 25, 2020
  • Number of updates: 89
  • Update frequency: every 13.0 days
  • Top authors: imacreste (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active /4,524 total downloads

Benchmarks

Plugin footprint 83% from 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.40MB] [CPU: ▼8.04ms] Passed 4 tests

A check of server-side resources used by imacPrestashop
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4147.34 ▲3.33
Dashboard /wp-admin3.72 ▲0.3755.34 ▼16.42
Posts /wp-admin/edit.php3.83 ▲0.4749.69 ▼2.22
Add New Post /wp-admin/post-new.php6.30 ▲0.4191.28 ▼13.40
Media Library /wp-admin/upload.php3.64 ▲0.4136.28 ▼0.10
Ayuda Base de datos /wp-admin/admin.php?page=imacPrestashopbd_help3.6136.38
imacprestashop /wp-admin/options-general.php?page=imacprestashop3.5934.08
Configuraciones Prestashop Base de datos (OPCIÓN ANTIGUA) /wp-admin/admin.php?page=imacprestashopbd3.5932.54
Ayuda WebService /wp-admin/admin.php?page=imacprestashop_help3.6135.62

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_imacprestashop_widget_webservice
widget_imacprestashop_widget
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
widget_imacprestashop_widget_webservice_cat
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for imacPrestashop
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5114.38 ▼0.261.81 ▼0.1348.53 ▲6.35
Dashboard /wp-admin2,201 ▲215.64 ▼0.0286.40 ▼13.7739.80 ▼4.76
Posts /wp-admin/edit.php2,106 ▲92.04 ▲0.1033.91 ▼4.7434.68 ▼0.68
Add New Post /wp-admin/post-new.php1,533 ▲523.01 ▲0.04657.38 ▼37.0051.93 ▼5.63
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0096.79 ▼12.0542.15 ▼4.95
Ayuda Base de datos /wp-admin/admin.php?page=imacPrestashopbd_help1,1351.9823.1735.89
imacprestashop /wp-admin/options-general.php?page=imacprestashop1,1332.0125.9848.94
Configuraciones Prestashop Base de datos (OPCIÓN ANTIGUA) /wp-admin/admin.php?page=imacprestashopbd9821.148.0523.90
Ayuda WebService /wp-admin/admin.php?page=imacprestashop_help1,1371.9923.1130.75

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_imacprestashop_widget_webservice
    • widget_recent-posts
    • widget_imacprestashop_widget_webservice_cat
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_imacprestashop_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 29 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=imacprestashopbd
    • > Notice in wp-content/plugins/imacprestashop/imacPrestashop.php+1259
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=imacprestashop
    • > Notice in wp-content/plugins/imacprestashop/imacPrestashop.php+263
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=imacprestashopbd
    • > Warning in wp-content/plugins/imacprestashop/imacPrestashop.php+1264
    mysqli_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: YES)

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/imacprestashop/imacPrestashop.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add a description for screenshot #4 in imacprestashop/assets to your readme.txt
  • Plugin Name: Please specify the plugin name on the first line ( === imacprestashop === )
The official readme.txt might help

imacprestashop/imacPrestashop.php 92% from 13 tests

The main PHP file in "imacPrestashop" ver. 2.0.17 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("imacprestashop.php" instead of "imacPrestashop.php")

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
There were no executable files found in this plugin2,208 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4140232,089
CSS200119

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity21.00
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity5.76
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods21
▷ Static methods29.52%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/configuracion_imacprestashopws.png37.41KB18.58KB▼ 50.34%