83% wp-sacloud-webaccel

Code Review | wp-sacloud-webaccel

WordPress plugin wp-sacloud-webaccel scored83%from 54 tests.

About plugin

  • Plugin page: wp-sacloud-webaccel
  • Plugin version: 0.0.13
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-6.2.1
  • WordPress version: 6.3.1
  • First release: Sep 8, 2016
  • Latest release: May 17, 2023
  • Number of updates: 48
  • Update frequency: every 50.9 days
  • Top authors: yamamotofebc (83.33%)sacloudusers (18.75%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,519 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.22MB] [CPU: ▲945.65ms] 50% from 4 tests

Analyzing server-side resources used by wp-sacloud-webaccel
The following require your attention
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,437.05ms on /wp-admin/options-general.php?page=wp-sacloud-webaccel/wp-sacloud-webaccel.php)
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 945.65ms on /wp-admin/options-general.php?page=wp-sacloud-webaccel/wp-sacloud-webaccel.php)
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2036.43 ▼3.85
Dashboard /wp-admin3.58 ▲0.281,312.59 ▲1,258.49
Posts /wp-admin/edit.php3.64 ▲0.271,420.77 ▲1,372.92
Add New Post /wp-admin/post-new.php6.10 ▲0.211,333.63 ▲1,233.45
Media Library /wp-admin/upload.php3.45 ▲0.211,330.61 ▲1,294.51
WebAccelerator /wp-admin/options-general.php?page=wp-sacloud-webaccel/wp-sacloud-webaccel.php3.451,437.05

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for wp-sacloud-webaccel
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.36 ▲0.011.76 ▲0.2939.04 ▼0.87
Dashboard /wp-admin2,198 ▲245.51 ▼0.0781.86 ▼2.8438.70 ▲4.55
Posts /wp-admin/edit.php2,109 ▲91.96 ▼0.0833.81 ▼2.4432.61 ▼3.39
Add New Post /wp-admin/post-new.php1,536 ▲823.07 ▲0.02596.57 ▼34.6557.81 ▲4.77
Media Library /wp-admin/upload.php1,409 ▲64.14 ▼0.0490.28 ▼14.4741.85 ▼2.88
WebAccelerator /wp-admin/options-general.php?page=wp-sacloud-webaccel/wp-sacloud-webaccel.php1,0112.0222.1031.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-sacloud-webaccel/wp-sacloud-webaccel.php:15
    • > PHP Notice
      Undefined variable: messages in wp-content/plugins/wp-sacloud-webaccel/tpl/setting.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-sacloud-webaccel/tpl/setting.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

wp-sacloud-webaccel/wp-sacloud-webaccel.php Passed 13 tests

The entry point to "wp-sacloud-webaccel" version 0.0.13 is a PHP file that has certain tags in its header comment area
109 characters long description:
WordPressとさくらのクラウド ウェブアクセラレータを連携させるためのプラグイン

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,539 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP33331451,371
PO File190164134
JavaScript14129
CSS1005

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity12.00
▷ Minimum class complexity3.00
▷ Maximum class complexity21.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods650.00%
▷ Protected methods00.00%
▷ Private methods650.00%
Functions60
▷ Named functions5998.33%
▷ Anonymous functions11.67%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
1 PNG file occupies 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png160.13KB54.84KB▼ 65.75%