84% affiliate-codecanyon-widget

Code Review | Affiliate CodeCanyon Widget

WordPress plugin Affiliate CodeCanyon Widget scored 84% from 54 tests.

About plugin

  • Plugin page: affiliate-codecan...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.6
  • WordPress version: 6.3.1
  • First release: Oct 12, 2019
  • Latest release: Dec 13, 2020
  • Number of updates: 12
  • Update frequency: every 111.7 days
  • Top authors: stefanpejcic (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 1,561 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.39ms] Passed 4 tests

A check of server-side resources used by Affiliate CodeCanyon Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1143.17 ▲4.31
Dashboard /wp-admin3.41 ▲0.1149.62 ▲4.25
Posts /wp-admin/edit.php3.46 ▲0.1046.69 ▼2.33
Add New Post /wp-admin/post-new.php5.99 ▲0.1084.78 ▼10.79
Media Library /wp-admin/upload.php3.33 ▲0.1035.80 ▼0.70

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Affiliate CodeCanyon Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6714.82 ▲0.441.80 ▼0.0144.32 ▼1.98
Dashboard /wp-admin2,209 ▲185.81 ▲0.9298.40 ▼4.1242.49 ▼1.01
Posts /wp-admin/edit.php2,086 ▼31.98 ▼0.0735.03 ▲0.6331.45 ▼1.46
Add New Post /wp-admin/post-new.php1,542 ▲918.34 ▼4.83624.86 ▼39.9253.01 ▼6.92
Media Library /wp-admin/upload.php1,388 ▲34.20 ▲0.0194.37 ▼1.3542.07 ▼1.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_pb_codecanyon_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/affiliate-codecanyon-widget/inc/class-codecanyon-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/affiliate-codecanyon-widget/affiliate-codecanyon-widget.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: ad, advertising, widget, ads, codecanyon...

affiliate-codecanyon-widget/affiliate-codecanyon-widget.php Passed 13 tests

Analyzing the main PHP file in "Affiliate CodeCanyon Widget" version 1.1
73 characters long description:
Display CodeCanyon items as a WordPress widget with your affiliate links.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin447 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity61.00
▷ Minimum class complexity61.00
▷ Maximum class complexity61.00
Average method complexity5.29
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin