79% na-e-commerce-egypt-cities-states

Code Review | NA E-Commerce Egypt Cities/States

WordPress plugin NA E-Commerce Egypt Cities/States scored 79% from 54 tests.

About plugin

  • Plugin page: na-e-commerce-egy...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Mar 23, 2023
  • Latest release: Mar 23, 2023
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: peternapoleon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 111 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.82MB] [CPU: ▼31.46ms] Passed 4 tests

An overview of server-side resources used by NA E-Commerce Egypt Cities/States
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.90 ▼3.26
Dashboard /wp-admin3.12 ▼0.1824.34 ▼27.46
Posts /wp-admin/edit.php3.12 ▼0.2323.22 ▼22.91
Add New Post /wp-admin/post-new.php3.12 ▼2.7724.02 ▼65.61
Media Library /wp-admin/upload.php3.12 ▼0.1124.54 ▼9.86

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for NA E-Commerce Egypt Cities/States
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.73 ▲0.061.76 ▼0.0936.08 ▼20.22
Dashboard /wp-admin2,209 ▲244.84 ▼0.21109.06 ▼24.4242.22 ▼7.00
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0336.73 ▼4.7729.91 ▼7.88
Add New Post /wp-admin/post-new.php1,536 ▼623.30 ▲4.92656.70 ▲11.7279.18 ▲3.94
Media Library /wp-admin/upload.php1,388 ▼04.25 ▲0.0598.69 ▼10.4542.15 ▼3.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'be_wc_check' not found or invalid function name
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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 no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

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)
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.png .), #2 (This screen shot description corresponds to screenshot-2.png .)
You can look at the official readme.txt

na-e-commerce-egypt-cities-states/Egypt Cities.php 77% from 13 tests

The principal PHP file in "NA E-Commerce Egypt Cities/States" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("na-e-commerce-egypt-cities-states.php" instead of "Egypt Cities.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin234 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14535234

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
PNG images were not found in this plugin