67% wp-sacloud-ojs

Code Review | wp-sacloud-ojs

WordPress plugin wp-sacloud-ojs scored67%from 54 tests.

About plugin

  • Plugin page: wp-sacloud-ojs
  • Plugin version: 0.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-5.0.3
  • WordPress version: 6.3.1
  • First release: Aug 26, 2016
  • Latest release: Jan 11, 2019
  • Number of updates: 40
  • Update frequency: every 21.7 days
  • Top authors: yamamotofebc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,084 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
This plugin's installer ran successfully

Server metrics [RAM: ▲3.08MB] [CPU: ▲2,362.40ms] 50% from 4 tests

Analyzing server-side resources used by wp-sacloud-ojs
It is recommended to improve the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 2,478.86ms on /wp-admin/options-general.php?page=wp-sacloud-ojs/wp-sacloud-ojs.php)
  • Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 2,362.40ms on /wp-admin/options-general.php?page=wp-sacloud-ojs/wp-sacloud-ojs.php)
PageMemory (MB)CPU Time (ms)
Home /6.54 ▲3.082,759.59 ▲2,715.98
Dashboard /wp-admin6.41 ▲3.102,698.35 ▲2,650.29
Posts /wp-admin/edit.php6.46 ▲3.102,467.13 ▲2,418.85
Add New Post /wp-admin/post-new.php8.93 ▲3.042,658.84 ▲2,569.91
Media Library /wp-admin/upload.php6.33 ▲3.101,845.41 ▲1,810.54
ObjectStorage /wp-admin/options-general.php?page=wp-sacloud-ojs/wp-sacloud-ojs.php6.242,478.86

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for wp-sacloud-ojs
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.22 ▼1.032.10 ▲0.3036.89 ▼12.33
Dashboard /wp-admin2,219 ▲314.84 ▼0.0494.41 ▼11.3141.86 ▼0.53
Posts /wp-admin/edit.php2,098 ▲121.99 ▲0.0132.63 ▼5.8337.96 ▲4.11
Add New Post /wp-admin/post-new.php1,527 ▲1321.26 ▲3.85654.02 ▼21.7254.38 ▲1.12
Media Library /wp-admin/upload.php1,395 ▲104.18 ▼0.0589.89 ▼29.1743.12 ▼2.14
ObjectStorage /wp-admin/options-general.php?page=wp-sacloud-ojs/wp-sacloud-ojs.php9192.0523.0332.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-sacloud-ojs/vendor/aws/aws-sdk-php/tests/bootstrap.php
    • > /wp-content/plugins/wp-sacloud-ojs/vendor/aws/aws-sdk-php/compatibility-test.php
  • 1535× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Guzzle\\Tests\\GuzzleTestCase' not found in wp-content/plugins/wp-sacloud-ojs/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/AbstractResponseVisitorTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Common\\Client\\AbstractClient' not found in wp-content/plugins/wp-sacloud-ojs/vendor/aws/aws-sdk-php/src/Aws/DeviceFarm/DeviceFarmClient.php:62
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Common\\Enum' not found in wp-content/plugins/wp-sacloud-ojs/vendor/aws/aws-sdk-php/src/Aws/S3/Enum/GranteeType.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\CloudFront\\Exception\\CloudFrontException' not found in wp-content/plugins/wp-sacloud-ojs/vendor/aws/aws-sdk-php/src/Aws/CloudFront/Exception/TooManyTrustedSignersException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\S3\\Exception\\S3Exception' not found in wp-content/plugins/wp-sacloud-ojs/vendor/aws/aws-sdk-php/src/Aws/S3/Exception/NoSuchTagSetException.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\Common\\Waiter\\WaiterFactoryInterface' not found in wp-content/plugins/wp-sacloud-ojs/vendor/aws/aws-sdk-php/src/Aws/Common/Waiter/WaiterClassFactory.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Guzzle\\Plugin\\Backoff\\AbstractErrorCodeBackoffStrategy' not found in wp-content/plugins/wp-sacloud-ojs/vendor/guzzle/guzzle/src/Guzzle/Plugin/Backoff/HttpBackoffStrategy.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-sacloud-ojs/vendor/symfony/event-dispatcher/Tests/EventTest.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\SimpleDb\\Exception\\SimpleDbException' not found in wp-content/plugins/wp-sacloud-ojs/vendor/aws/aws-sdk-php/src/Aws/SimpleDb/Exception/AttributeDoesNotExistException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Guzzle\\Tests\\GuzzleTestCase' not found in wp-content/plugins/wp-sacloud-ojs/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Description/SchemaFormatterTest.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

wp-sacloud-ojs/wp-sacloud-ojs.php 92% from 13 tests

The entry point to "wp-sacloud-ojs" version 0.0.11 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 146 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
These items require your attention
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wp-sacloud-ojs/vendor/aws/aws-sdk-php/docs/make.bat
268,418 lines of code in 1,879 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,70514,20446,447258,326
reStructuredText942,8973,7874,117
Markdown1362702,786
JSON382501,554
make36525299
XML74022290
Python3159236285
DOS Batch1231166
JavaScript31739160
CSS3192147
HTML52212137
PO File15511286
Ant110134
YAML28031

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.12
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces394
Interfaces76
Traits0
Classes1,600
▷ Abstract classes402.50%
▷ Concrete classes1,56097.50%
▷ Final classes10.06%
Methods5,183
▷ Static methods3256.27%
▷ Public methods4,69390.55%
▷ Protected methods3957.62%
▷ Private methods951.83%
Functions261
▷ Named functions3111.88%
▷ Anonymous functions23088.12%
Constants1,117
▷ Global constants00.00%
▷ Class constants1,117100.00%
▷ Public constants1,117100.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
4 PNG files occupy 0.38MB with 0.18MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/aws/aws-sdk-php/docs/_static/logo.png3.56KB1.50KB▼ 57.91%
screenshot-1.png137.91KB44.97KB▼ 67.39%
vendor/guzzle/guzzle/docs/_static/guzzle-icon.png0.78KB0.94KB0.00%
vendor/guzzle/guzzle/docs/_static/logo.png241.87KB69.68KB▼ 71.19%