10% smarts3

Code Review | SmartS3

WordPress plugin SmartS3 scored10%from 54 tests.

About plugin

  • Plugin page: smarts3
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Jun 24, 2013
  • Latest release: Jun 6, 2014
  • Number of updates: 9
  • Update frequency: every 38.7 days
  • Top authors: johnmorris10 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,164 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/smarts3/includes/class-methods-smarts3.php+8
    Use of undefined constant MCRYPT_RIJNDAEL_256 - assumed 'MCRYPT_RIJNDAEL_256' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.06ms] Passed 4 tests

A check of server-side resources used by SmartS3
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.01 ▼2.54
Dashboard /wp-admin3.31 ▲0.0047.51 ▼3.06
Posts /wp-admin/edit.php3.36 ▲0.0049.28 ▲1.00
Add New Post /wp-admin/post-new.php5.89 ▲0.00112.05 ▲11.83
Media Library /wp-admin/upload.php3.23 ▲0.0038.36 ▲0.37

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 663 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by SmartS3
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.66 ▲0.421.74 ▼3.8343.05 ▼1.36
Dashboard /wp-admin2,206 ▲214.84 ▼1.01100.20 ▼1.5043.04 ▼2.45
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0140.88 ▲0.9835.03 ▼1.28
Add New Post /wp-admin/post-new.php1,539 ▲1923.08 ▼0.04600.96 ▼6.3047.52 ▼11.48
Media Library /wp-admin/upload.php1,388 ▲34.13 ▼0.1296.75 ▼5.4544.16 ▼0.81

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
  • 489× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Guzzle\\Service\\Command\\LocationVisitor\\Response\\AbstractResponseVisitor' not found in wp-content/plugins/smarts3/includes/aws/Guzzle/Service/Command/LocationVisitor/Response/JsonVisitor.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\S3\\Exception\\S3Exception' not found in wp-content/plugins/smarts3/includes/aws/Aws/S3/Exception/OperationAbortedException.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\EventDispatcher\\EventSubscriberInterface' not found in wp-content/plugins/smarts3/includes/aws/Guzzle/Plugin/Oauth/OauthPlugin.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\EventDispatcher\\EventSubscriberInterface' not found in wp-content/plugins/smarts3/includes/aws/Aws/Common/Exception/ExceptionListener.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Common\\Exception\\ServiceResponseException' not found in wp-content/plugins/smarts3/includes/aws/Aws/CloudFront/Exception/Exception.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\CloudFront\\Exception\\CloudFrontException' not found in wp-content/plugins/smarts3/includes/aws/Aws/CloudFront/Exception/InconsistentQuantitiesException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\S3\\Exception\\S3Exception' not found in wp-content/plugins/smarts3/includes/aws/Aws/S3/Exception/CredentialsNotSupportedException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/smarts3/includes/aws/Monolog/Handler/FirePHPHandler.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\EventDispatcher\\EventSubscriberInterface' not found in wp-content/plugins/smarts3/includes/aws/Guzzle/Plugin/CurlAuth/CurlAuthPlugin.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Guzzle\\Plugin\\Backoff\\AbstractBackoffStrategy' not found in wp-content/plugins/smarts3/includes/aws/Aws/Common/Client/ThrottlingErrorChecker.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === smarts3 === )
  • Donate link: Invalid URI ("http:johnmorrisonline.com")
The official readme.txt is a good inspiration

smarts3/smarts3.php Passed 13 tests

"SmartS3" version 0.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
64 characters long description:
Enables easy embedding of Amazon S3 videos into a WordPress blog

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin30,193 lines of code in 657 files:
LanguageFilesBlank linesComment linesLines of code
PHP6566,47524,64230,187
CSS1106

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity4.88
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces98
Interfaces79
Traits13
Classes582
▷ Abstract classes356.01%
▷ Concrete classes54793.99%
▷ Final classes00.00%
Methods2,528
▷ Static methods1405.54%
▷ Public methods2,15985.40%
▷ Protected methods33313.17%
▷ Private methods361.42%
Functions49
▷ Named functions48.16%
▷ Anonymous functions4591.84%
Constants270
▷ Global constants10.37%
▷ Class constants26999.63%
▷ Public constants269100.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 are no PNG files in this plugin