78% awsslideshow

Code Review | AWS Slideshow

WordPress plugin AWS Slideshow scored78%from 54 tests.

About plugin

  • Plugin page: awsslideshow
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.1
  • WordPress version: 6.3.1
  • First release: May 8, 2015
  • Latest release: May 9, 2015
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: awstheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by AWS Slideshow
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0835.99 ▼6.72
Dashboard /wp-admin3.41 ▲0.1148.85 ▼2.22
Posts /wp-admin/edit.php3.52 ▲0.1752.65 ▲5.11
Add New Post /wp-admin/post-new.php5.99 ▲0.1187.96 ▼8.13
Media Library /wp-admin/upload.php3.33 ▲0.1044.61 ▲8.77

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 689 new files
Database: 1 new table, 7 new options
New tables
wp_awsslideshow_slides
New WordPress options
db_upgraded
widget_recent-comments
awsslideshow_db_version
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for AWS Slideshow
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,073 ▲33814.26 ▼0.3916.33 ▲14.3145.06 ▼4.91
Dashboard /wp-admin2,222 ▲315.82 ▲0.9299.87 ▼6.5739.12 ▼8.17
Posts /wp-admin/edit.php2,105 ▲161.99 ▼0.0741.01 ▲5.8035.18 ▼0.56
Add New Post /wp-admin/post-new.php1,550 ▲1723.18 ▼0.25599.59 ▼93.4359.63 ▲1.83
Media Library /wp-admin/upload.php1,407 ▲224.22 ▲0.06108.84 ▲3.2943.41 ▲0.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/awsslideshow/awsslideshow.php
    • > /wp-content/plugins/awsslideshow/includes/class-aws-slideshows-list-table.php
    • > /wp-content/plugins/awsslideshow/includes/class-aws-slideshows-model.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/awsslideshow/includes/class-aws-slideshows-widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/awsslideshow/views/slideshows/new.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/awsslideshow/views/slideshows/edit.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/awsslideshow/views/slideshows/default.php:4

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4, #5 in awsslideshow/assets to your readme.txt
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === awsslideshow === )
The official readme.txt is a good inspiration

awsslideshow/awsslideshow.php 92% from 13 tests

The entry point to "AWS Slideshow" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 196 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected34,769 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript306,1959,44118,918
CSS111,30526610,577
SVG3032,820
HTML914139987
LESS1151275811
PHP832696621
Markdown234035

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity18.25
▷ Minimum class complexity11.00
▷ Maximum class complexity35.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods43
▷ Static methods12.33%
▷ Public methods4093.02%
▷ Protected methods12.33%
▷ Private methods24.65%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
608 compressed PNG files occupy 1.81MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/icons/ionicons/png/512/android-social.png3.76KB4.16KB0.00%
css/icons/ionicons/png/512/android-playstore.png3.09KB3.35KB0.00%
css/icons/ionicons/png/512/clock.png5.73KB6.47KB0.00%
css/icons/ionicons/png/512/arrow-right-c.png1.62KB1.67KB0.00%
css/icons/ionicons/png/512/ios7-clock.png2.70KB2.96KB0.00%