83% edd-persian-cs

Code Review | EDD Persian CS

WordPress plugin EDD Persian CS scored83%from 54 tests.

About plugin

  • Plugin page: edd-persian-cs
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 9, 2017
  • Latest release: Mar 7, 2018
  • Number of updates: 13
  • Update frequency: every 30.1 days
  • Top authors: ham3da (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,619 total downloads

Benchmarks

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

A check of server-side resources used by EDD Persian CS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0434.28 ▼4.21
Dashboard /wp-admin3.35 ▲0.0148.42 ▼8.06
Posts /wp-admin/edit.php3.40 ▲0.0547.31 ▼0.29
Add New Post /wp-admin/post-new.php5.93 ▲0.0594.52 ▼1.30
Media Library /wp-admin/upload.php3.27 ▲0.0531.44 ▼17.66

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for EDD Persian CS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.61 ▼1.171.69 ▼0.0739.58 ▼3.80
Dashboard /wp-admin2,218 ▲274.86 ▼0.04105.31 ▲0.5939.26 ▼2.17
Posts /wp-admin/edit.php2,104 ▲181.99 ▼0.0742.32 ▲7.4734.83 ▼2.02
Add New Post /wp-admin/post-new.php1,544 ▲2523.43 ▲0.50614.37 ▼118.0752.59 ▼7.06
Media Library /wp-admin/upload.php1,400 ▲154.26 ▲0.14101.81 ▼37.7942.31 ▼15.90

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/edd-persian-cs/edd-pcs.php:16

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (countries and states in edd setting screenshot-1.png.), #2 (countries and states in edd cart screenshot-2.png.)
You can take inspiration from this readme.txt

edd-persian-cs/edd-pcs.php 85% from 13 tests

This is the main PHP file of "EDD Persian CS" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("edd-persian-cs.php" instead of "edd-pcs.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected374 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11011324
PO File191250

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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
Namespaces0
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png17.52KB8.56KB▼ 51.17%
screenshot-1.png30.49KB17.93KB▼ 41.18%