84% widgets-for-amazon

Code Review | Widgets for Amazon

WordPress plugin Widgets for Amazon scored84%from 54 tests.

About plugin

  • Plugin page: widgets-for-amazon
  • Plugin version: 1.0.27
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: May 11, 2022
  • Latest release: Aug 14, 2022
  • Number of updates: 28
  • Update frequency: every 3.4 days
  • Top authors: eggnstone (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /491 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.84ms] Passed 4 tests

Analyzing server-side resources used by Widgets for Amazon
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.54 ▲2.74
Dashboard /wp-admin3.33 ▲0.0244.11 ▼1.57
Posts /wp-admin/edit.php3.38 ▲0.0244.65 ▼0.71
Add New Post /wp-admin/post-new.php5.91 ▲0.0277.75 ▼13.76
Media Library /wp-admin/upload.php3.25 ▲0.0235.35 ▲0.70
Widgets for Amazon /wp-admin/tools.php?page=widgets_for_amazon3.2332.57

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Widgets for Amazon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.23 ▼0.332.01 ▲0.4943.97 ▲4.26
Dashboard /wp-admin2,196 ▲225.55 ▲0.0281.96 ▼5.6140.55 ▼1.36
Posts /wp-admin/edit.php2,101 ▲41.96 ▲0.0133.40 ▼3.0235.42 ▲0.61
Add New Post /wp-admin/post-new.php1,539 ▲1118.47 ▼4.57619.49 ▼24.3161.63 ▲2.80
Media Library /wp-admin/upload.php1,404 ▲44.19 ▲0.0394.87 ▼5.9938.93 ▼6.05
Widgets for Amazon /wp-admin/tools.php?page=widgets_for_amazon1,4612.0023.9928.22

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WidgetsForAmazon\\plugin_dir_path() in wp-content/plugins/widgets-for-amazon/widgets-for-amazon.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: widget, amazon, affiliate, widgets, search...

widgets-for-amazon/widgets-for-amazon.php Passed 13 tests

The entry point to "Widgets for Amazon" version 1.0.27 is a PHP file that has certain tags in its header comment area
31 characters long description:
Widgets for Amazon by eggnstone

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
There were no executable files found in this plugin1,072 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP513678738
JavaScript1353176
CSS1220158

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity15.50
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27100.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants00.00%
▷ Class constants21100.00%
▷ Public constants21100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin