78% qqworld-speed-4-china

Code Review | QQWorld Speed for China

WordPress plugin QQWorld Speed for China scored78%from 54 tests.

About plugin

  • Plugin page: qqworld-speed-4-c...
  • Plugin version: 1.6.6.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6
  • WordPress version: 6.3.1
  • First release: Sep 6, 2014
  • Latest release: Jan 3, 2021
  • Number of updates: 40
  • Update frequency: every 57.8 days
  • Top authors: qqworld (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /15,421 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.17MB] [CPU: ▼7.26ms] Passed 4 tests

An overview of server-side resources used by QQWorld Speed for China
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1339.18 ▲2.59
Dashboard /wp-admin3.48 ▲0.1844.65 ▼3.96
Posts /wp-admin/edit.php3.56 ▲0.2043.06 ▼3.77
Add New Post /wp-admin/post-new.php6.16 ▲0.2775.21 ▼20.99
Media Library /wp-admin/upload.php3.42 ▲0.1933.41 ▼0.33
QQWorld Speed for China /wp-admin/options-general.php?page=qqworld-speed-4-china3.4331.40

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by QQWorld Speed for China
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,753 ▲714.74 ▲0.121.70 ▲0.1046.19 ▲7.08
Dashboard /wp-admin2,167 ▼75.52 ▲0.0295.33 ▲5.7843.24 ▲4.65
Posts /wp-admin/edit.php2,079 ▼212.00 ▲0.0549.26 ▲12.7942.05 ▲7.38
Add New Post /wp-admin/post-new.php1,510 ▼1823.27 ▲0.12656.53 ▼7.0756.13 ▼1.11
Media Library /wp-admin/upload.php1,381 ▼194.15 ▼0.08103.33 ▼12.7948.03 ▲0.39
QQWorld Speed for China /wp-admin/options-general.php?page=qqworld-speed-4-china1,4383.1638.4061.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=qqworld-speed-4-china
    • > Notice in wp-content/plugins/qqworld-speed-4-china/qqworld-speed4china.php+136
    ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush

SRP 50% 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/qqworld-speed-4-china/qqworld-speed4china.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: speed, china

qqworld-speed-4-china/qqworld-speed4china.php 92% from 13 tests

"QQWorld Speed for China" version 1.6.6.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("qqworld-speed-4-china.php" instead of "qqworld-speed4china.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,231 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP16067685
PO File3234321510
CSS10036

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity69.00
▷ Minimum class complexity69.00
▷ Maximum class complexity69.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
2 compressed PNG files occupy 0.04MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wechat-qrcode.png30.54KB29.82KB▼ 2.37%
images/avatar_256x256.png7.67KB7.38KB▼ 3.86%