74% meipian-latest-posts-list-widget

Code Review | Sysbox - Latest MeiPian Post List Widget

WordPress plugin Sysbox - Latest MeiPian Post List Widget scored74%from 54 tests.

About plugin

  • Plugin page: meipian-latest-po...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Feb 9, 2017
  • Latest release: Feb 9, 2017
  • Number of updates: 6
  • Update frequency: every 13.3 days
  • Top authors: sysboxteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /468 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.85MB] [CPU: ▼53.60ms] Passed 4 tests

An overview of server-side resources used by Sysbox - Latest MeiPian Post List Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.334.96 ▼37.99
Dashboard /wp-admin2.16 ▼1.156.18 ▼47.00
Posts /wp-admin/edit.php2.16 ▼1.206.98 ▼42.96
Add New Post /wp-admin/post-new.php2.16 ▼3.737.57 ▼86.43
Media Library /wp-admin/upload.php2.16 ▼1.076.65 ▼27.43

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_sysbox_latest_mei_pian_post_list_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Sysbox - Latest MeiPian Post List Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲14513.54 ▼0.835.63 ▲3.7347.54 ▲4.77
Dashboard /wp-admin2,228 ▲254.83 ▼0.00103.24 ▼5.8742.57 ▲0.48
Posts /wp-admin/edit.php2,104 ▲12.01 ▼0.0137.63 ▼0.6836.17 ▼0.81
Add New Post /wp-admin/post-new.php1,530 ▼1817.68 ▼5.52674.69 ▲54.7251.49 ▲3.75
Media Library /wp-admin/upload.php1,407 ▲74.20 ▼0.03109.72 ▲9.7548.03 ▲5.82

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the sysbox-latest-mei-pian-post-list-widget-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_sysbox_latest_mei_pian_post_list_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/meipian-latest-posts-list-widget/common/widget.class.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/meipian-latest-posts-list-widget/common/widget.class.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/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
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Screenshot of the plugin working in a widget area.), #2 (New updated screenshot of the widget options.)
The official readme.txt is a good inspiration

meipian-latest-posts-list-widget/sysbox-latest-mei-pian-post-list-widget.php 92% from 13 tests

Analyzing the main PHP file in "Sysbox - Latest MeiPian Post List Widget" version 1.0
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("meipian-latest-posts-list-widget.php" instead of "sysbox-latest-mei-pian-post-list-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,467 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP42242871,408
CSS16047
JavaScript10312

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity83.50
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods92
▷ Static methods44.35%
▷ Public methods7682.61%
▷ Protected methods1617.39%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants2195.45%
▷ Class constants14.55%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png114.07KB29.34KB▼ 74.28%
screenshot-1.png35.20KB10.73KB▼ 69.53%