78% amberlink

Code Review | Amber

WordPress plugin Amber scored78%from 54 tests.

About plugin

  • Plugin page: amberlink
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Jan 13, 2016
  • Latest release: Oct 1, 2018
  • Number of updates: 295
  • Update frequency: every 3.5 days
  • Top authors: jeffreylicht (93.56%)berkmancenter (6.78%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,417 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.76MB] [CPU: ▲4.24ms] Passed 4 tests

This is a short check of server-side resources used by Amber
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.21 ▲0.7546.39 ▲3.00
Dashboard /wp-admin4.07 ▲0.7765.20 ▲13.56
Posts /wp-admin/edit.php4.19 ▲0.8355.88 ▲5.95
Add New Post /wp-admin/post-new.php6.66 ▲0.7794.05 ▼3.85
Media Library /wp-admin/upload.php4.00 ▲0.7745.15 ▲11.86
Amber Dashboard /wp-admin/tools.php?page=amber-dashboard3.9842.99
Amber Settings /wp-admin/options-general.php?page=amber-setting-admin3.9435.44

Server storage [IO: ▲11.53MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • Illegal file modification found: 1 file (1.07KB) outside of "wp-content/plugins/amberlink/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 1,406 new files
Database: 4 new tables, 9 new options
New tables
wp_amber_check
wp_amber_queue
wp_amber_cache
wp_amber_activity
New WordPress options
can_compress_scripts
amber_db_version
amber_options
amber_last_check_run
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Amber
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲10213.24 ▼1.416.57 ▲4.8441.80 ▼0.20
Dashboard /wp-admin2,237 ▲344.88 ▼0.03100.44 ▼16.3640.74 ▼4.74
Posts /wp-admin/edit.php2,116 ▲162.00 ▼0.0535.84 ▼2.1437.40 ▲3.31
Add New Post /wp-admin/post-new.php6,260 ▲4,71925.69 ▲7.19892.76 ▲214.0754.50 ▼2.05
Media Library /wp-admin/upload.php1,413 ▲164.17 ▼0.0799.62 ▼0.2945.30 ▲3.36
Amber Dashboard /wp-admin/tools.php?page=amber-dashboard1,1451.8124.2334.72
Amber Settings /wp-admin/options-general.php?page=amber-setting-admin2,3091.7927.7133.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 9 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • amber_db_version
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • amber_options
    • widget_recent-comments
    • amber_last_check_run

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=amber-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=amber-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1192× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\S3\\Exception\\S3Exception' not found in wp-content/plugins/amberlink/vendor/aws/Aws/S3/Exception/NotSignedUpException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Redshift\\Exception\\RedshiftException' not found in wp-content/plugins/amberlink/vendor/aws/Aws/Redshift/Exception/ClusterSubnetGroupAlreadyExistsException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\CloudSearch\\Exception\\CloudSearchException' not found in wp-content/plugins/amberlink/vendor/aws/Aws/CloudSearch/Exception/InvalidTypeException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/amberlink/vendor/aws/Monolog/Handler/MailHandler.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Guzzle\\Common\\ToArrayInterface' not found in wp-content/plugins/amberlink/vendor/aws/Aws/S3/Model/Acp.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Rds\\Exception\\RdsException' not found in wp-content/plugins/amberlink/vendor/aws/Aws/Rds/Exception/InvalidDBParameterGroupStateException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Iam\\Exception\\IamException' not found in wp-content/plugins/amberlink/vendor/aws/Aws/Iam/Exception/EntityAlreadyExistsException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\S3\\Exception\\S3Exception' not found in wp-content/plugins/amberlink/vendor/aws/Aws/S3/Exception/DeleteMultipleObjectsException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Common\\Exception\\ServiceResponseException' not found in wp-content/plugins/amberlink/vendor/aws/Aws/DynamoDbStreams/Exception/DynamoDbStreamsException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\CloudFront\\Exception\\CloudFrontException' not found in wp-content/plugins/amberlink/vendor/aws/Aws/CloudFront/Exception/TooManyCacheBehaviorsException.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: links, archiving

amberlink/amber.php 92% from 13 tests

The principal PHP file in "Amber" v. 1.4.4 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("amberlink.php" instead of "amber.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected229,260 lines of code in 1,399 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,39010,55343,839227,163
Markdown429201,268
JavaScript15832467
CSS2433263
Bourne Shell121685
XML10014

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity4.01
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces219
Interfaces92
Traits2
Classes1,287
▷ Abstract classes423.26%
▷ Concrete classes1,24596.74%
▷ Final classes10.08%
Methods3,688
▷ Static methods37010.03%
▷ Public methods2,95280.04%
▷ Protected methods57215.51%
▷ Private methods1644.45%
Functions92
▷ Named functions11.09%
▷ Anonymous functions9198.91%
Constants1,159
▷ Global constants151.29%
▷ Class constants1,14498.71%
▷ Public constants1,144100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/close-button.png1.21KB0.21KB▼ 82.28%
css/alert-large.png1.78KB0.82KB▼ 53.95%
css/check-small.png1.48KB0.51KB▼ 65.64%
css/alert-small.png1.31KB0.40KB▼ 69.52%