63% amazon-scraper

Code Review | Amazon Scraper

WordPress plugin Amazon Scraper scored63%from 54 tests.

About plugin

  • Plugin page: amazon-scraper
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 8, 2013
  • Latest release: Nov 26, 2013
  • Number of updates: 19
  • Update frequency: every 1.0 days
  • Top authors: Submone (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,325 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.93MB] [CPU: ▼33.90ms] Passed 4 tests

An overview of server-side resources used by Amazon Scraper
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.07 ▼4.17
Dashboard /wp-admin3.01 ▼0.2922.05 ▼26.17
Posts /wp-admin/edit.php3.01 ▼0.3524.18 ▼15.56
Add New Post /wp-admin/post-new.php3.01 ▼2.8823.27 ▼77.49
Media Library /wp-admin/upload.php3.01 ▼0.2219.84 ▼16.39

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: 1 new table, 6 new options
New tables
wp_amazon_settings
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Amazon Scraper
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.90 ▼0.631.55 ▼0.1336.25 ▼6.92
Dashboard /wp-admin2,211 ▲345.52 ▼0.1585.52 ▼14.2839.16 ▼6.19
Posts /wp-admin/edit.php2,119 ▲192.02 ▼0.0138.35 ▼1.1135.76 ▼2.39
Add New Post /wp-admin/post-new.php1,539 ▲123.30 ▲5.04671.21 ▲26.2852.04 ▼20.97
Media Library /wp-admin/upload.php1,416 ▲164.21 ▲0.1295.97 ▼19.9243.47 ▼6.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie tables were found after uninstall: 1 table
    • wp_amazon_settings
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/amazon-scraper/amazon-admin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/amazon-scraper/settings.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/amazon-scraper/amazon-plugin.php:12
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/amazon-scraper/settings.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === amazon-scraper === )
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

amazon-scraper/amazon-plugin.php 85% from 13 tests

The main PHP file in "Amazon Scraper" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("amazon-scraper.php" instead of "amazon-plugin.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 166 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
There were no executable files found in this plugin502 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5127233478
CSS15024

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.28
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1460.87%
▷ Protected methods939.13%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.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 were not PNG files found in your plugin