77% amzft

Code Review | Fragment's Product Advertising for Amazon

WordPress plugin Fragment's Product Advertising for Amazon scored 77% from 54 tests.

About plugin

  • Plugin page: amzft
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 23, 2021
  • Latest release: Nov 8, 2021
  • Number of updates: 10
  • Update frequency: every 1.6 days
  • Top authors: frgmt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 314 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

An overview of server-side resources used by Fragment's Product Advertising for Amazon
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0140.61 ▼0.82
Dashboard /wp-admin3.33 ▲0.0346.34 ▼3.05
Posts /wp-admin/edit.php3.38 ▲0.0348.62 ▼0.62
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.59 ▼0.20
Media Library /wp-admin/upload.php3.25 ▲0.0241.24 ▲8.54
FragmentAmzn /wp-admin/options-general.php?page=custom-fragment-amzn-config3.2028.48

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Fragment's Product Advertising for Amazon: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲8213.45 ▼0.681.53 ▼0.1739.96 ▼3.63
Dashboard /wp-admin2,222 ▲344.86 ▼0.0498.34 ▼6.4538.30 ▼3.71
Posts /wp-admin/edit.php2,105 ▲132.04 ▲0.0339.32 ▼2.0238.29 ▲4.59
Add New Post /wp-admin/post-new.php6,599 ▲5,06529.50 ▲6.45911.45 ▲310.8461.22 ▲8.48
Media Library /wp-admin/upload.php1,401 ▲194.20 ▼0.02111.98 ▲15.1246.98 ▲4.04
FragmentAmzn /wp-admin/options-general.php?page=custom-fragment-amzn-config8612.0226.7178.98

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=custom-fragment-amzn-config
    • > Notice in wp-content/plugins/amzft/fragment-amzn.php+191
    Undefined index: tab

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=custom-fragment-amzn-config
    • > Network (severe)
    wp-content/plugins/amzft/src/edit.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
No plugin tags provided

amzft/fragment-amzn.php 69% from 13 tests

The main PHP script in "Fragment's Product Advertising for Amazon" version 1.0.3 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "5.8")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("amzft.php" instead of "fragment-amzn.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 319 characters long)

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
Everything looks great! No dangerous files found in this plugin20,676 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JSON30019,565
JavaScript165153410
CSS2313365
PHP45341336

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.65
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods14.35%
▷ Public methods1565.22%
▷ Protected methods00.00%
▷ Private methods834.78%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin