61% ninjalibs-ses

Code Review | Ninja Libs Amazon SES

WordPress plugin Ninja Libs Amazon SES scored 61% from 54 tests.

About plugin

  • Plugin page: ninjalibs-ses
  • Plugin version: 0.0.9
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Oct 15, 2020
  • Latest release: Nov 11, 2020
  • Number of updates: 11
  • Update frequency: every 2.4 days
  • Top authors: ninjalibs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 222 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲4.73MB] [CPU: ▼302.70ms] Passed 4 tests

An overview of server-side resources used by Ninja Libs Amazon SES
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /8.86 ▲5.3583.22 ▲33.77
Dashboard /wp-admin8.88 ▲5.4747.04 ▲14.07
Posts /wp-admin/edit.php8.88 ▲5.2444.23 ▲6.32
Add New Post /wp-admin/post-new.php9.84 ▲2.8899.26 ▼1,238.00
Media Library /wp-admin/upload.php8.88 ▲5.5839.02 ▲6.81
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius8.8839.33

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 1,743 new files
Database: 1 new table, 5 new options
New tables
wp_ninjalibs_ses_blocked
New WordPress options
ninjalibs_ses_version
fs_active_plugins
fs_accounts
fs_debug_mode
fs_gdpr

Browser metrics Passed 4 tests

Checking browser requirements for Ninja Libs Amazon SES
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,836 ▲9416.10 ▲0.106.02 ▼0.232.10 ▼0.18
Dashboard /wp-admin2,961 ▲1006.37 ▲0.20118.86 ▼18.99164.13 ▲5.56
Posts /wp-admin/edit.php2,763 ▲723.31 ▲0.0661.26 ▼9.13151.58 ▲8.02
Add New Post /wp-admin/post-new.php1,694 ▲2921.38 ▲0.93428.17 ▼56.42150.96 ▼12.23
Media Library /wp-admin/upload.php1,771 ▲735.94 ▲0.40120.64 ▼19.81194.06 ▲13.90
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius1,4922.7954.91121.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/ninjalibs-ses/freemius/includes/class-freemius.php+8540
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • fs_debug_mode
    • fs_gdpr
    • fs_active_plugins
    • fs_accounts

Smoke tests 25% 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
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Notice in wp-admin/includes/plugin.php+1871
    Undefined offset: 2
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Notice in wp-admin/menu-header.php+195
    Undefined offset: 0

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ninjalibs-ses/vendor/bin/jp.php
    • > /wp-content/plugins/ninjalibs-ses/vendor/mtdowling/jmespath.php/bin/jp.php
    • > /wp-content/plugins/ninjalibs-ses/freemius/templates/ajax-loader.php
  • 654× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/ninjalibs-ses/vendor/aws/aws-sdk-php/src/Health/Exception/HealthException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/ninjalibs-ses/vendor/aws/aws-sdk-php/src/CloudDirectory/CloudDirectoryClient.php:141
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\MonitoringEventsInterface' not found in wp-content/plugins/ninjalibs-ses/vendor/aws/aws-sdk-php/src/Exception/CouldNotCreateChecksumException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/ninjalibs-ses/vendor/aws/aws-sdk-php/src/CostandUsageReportService/Exception/CostandUsageReportServiceException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/ninjalibs-ses/vendor/aws/aws-sdk-php/src/WorkMail/WorkMailClient.php:103
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/ninjalibs-ses/vendor/aws/aws-sdk-php/src/PI/Exception/PIException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/ninjalibs-ses/vendor/aws/aws-sdk-php/src/DynamoDb/DynamoDbClient.php:99
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/ninjalibs-ses/freemius/templates/partials/network-activation.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/ninjalibs-ses/vendor/aws/aws-sdk-php/src/Macie/MacieClient.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/ninjalibs-ses/vendor/aws/aws-sdk-php/src/Waf/Exception/WafException.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: Invalid version format
  • Requires php: Invalid version format
The official readme.txt is a good inspiration

ninjalibs-ses/ninjalibs-ses.php 85% from 13 tests

The principal PHP file in "Ninja Libs Amazon SES" v. 0.0.9 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/ninjalibs" does not exist
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 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 detected75,098 lines of code in 1,683 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,63314,36150,78569,971
Markdown161,17903,608
JSON1160965
JavaScript43465195
HTML2240128
XML300118
reStructuredText1352959
CSS123045
make1409

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,895)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity10.09
▷ Minimum class complexity1.00
▷ Maximum class complexity2,895.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces509
Interfaces49
Traits25
Classes795
▷ Abstract classes151.89%
▷ Concrete classes78098.11%
▷ Final classes232.95%
Methods3,602
▷ Static methods63917.74%
▷ Public methods2,53270.29%
▷ Protected methods1464.05%
▷ Private methods92425.65%
Functions598
▷ Named functions24040.13%
▷ Anonymous functions35859.87%
Constants342
▷ Global constants10731.29%
▷ Class constants23568.71%
▷ Public constants235100.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
5 PNG files occupy 0.03MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/ninjalibs-logo.png3.89KB3.95KB0.00%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
public/img/ses-icon.png0.95KB1.02KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
public/img/sns-icon.png0.73KB0.76KB0.00%