84% affiliates-ecwid-light

Code Review | Affiliates Ecwid Light

WordPress plugin Affiliates Ecwid Light scored84%from 54 tests.

About plugin

  • Plugin page: affiliates-ecwid-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.2
  • WordPress version: 6.3.1
  • First release: Apr 5, 2013
  • Latest release: Apr 23, 2015
  • Number of updates: 8
  • Update frequency: every 206.9 days
  • Top authors: itthinx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,904 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼10.80ms] Passed 4 tests

A check of server-side resources used by Affiliates Ecwid Light
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0632.07 ▼5.14
Dashboard /wp-admin3.37 ▲0.0244.24 ▼19.18
Posts /wp-admin/edit.php3.42 ▲0.0644.44 ▼2.85
Add New Post /wp-admin/post-new.php5.95 ▲0.0679.56 ▼16.01
Media Library /wp-admin/upload.php3.29 ▲0.0634.82 ▲3.22

Server storage [IO: ▲0.07MB] [DB: ▲0.07MB] 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

Browser metrics Passed 4 tests

Checking browser requirements for Affiliates Ecwid Light
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.72 ▲0.371.65 ▼0.0838.78 ▼0.28
Dashboard /wp-admin2,205 ▲255.56 ▼0.0982.10 ▼6.3240.85 ▲2.29
Posts /wp-admin/edit.php2,113 ▲161.98 ▼0.0135.81 ▲2.0730.81 ▼5.06
Add New Post /wp-admin/post-new.php1,539 ▲1023.19 ▲0.05686.25 ▲95.3864.39 ▲6.19
Media Library /wp-admin/upload.php1,416 ▲194.19 ▲0.0196.92 ▼7.3644.11 ▲0.28

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 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)
Good news, no errors were detected

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/affiliates-ecwid-light/affiliates-ecwid-light.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 31 tag instead of maximum 10
  • Screenshots: Screenshot #1 (Settings) image required
The official readme.txt is a good inspiration

affiliates-ecwid-light/affiliates-ecwid-light.php Passed 13 tests

"Affiliates Ecwid Light" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
31 characters long description:
Integrates Affiliates and Ecwid

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
No dangerous file extensions were detected543 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity53.00
▷ Minimum class complexity46.00
▷ Maximum class complexity60.00
Average method complexity5.95
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods942.86%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants325.00%
▷ Class constants975.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin