84% wp-reposidget

Code Review | WP Reposidget (GitHub 仓库挂件)

WordPress plugin WP Reposidget (GitHub 仓库挂件) scored 84% from 54 tests.

About plugin

  • Plugin page: wp-reposidget
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-4.0.1
  • WordPress version: 6.3.1
  • First release: May 23, 2013
  • Latest release: Jan 19, 2021
  • Number of updates: 19
  • Update frequency: every 147.3 days
  • Top authors: myst729 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,723 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.47ms] Passed 4 tests

Server-side resources used by WP Reposidget (GitHub 仓库挂件)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.44 ▼13.43
Dashboard /wp-admin3.32 ▲0.0144.72 ▼12.40
Posts /wp-admin/edit.php3.37 ▲0.0149.60 ▲2.73
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.79 ▲1.23
Media Library /wp-admin/upload.php3.24 ▲0.0136.50 ▲5.48
WP Reposidget /wp-admin/options-general.php?page=wp-reposidget-options3.2132.28

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

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

Browser metrics Passed 4 tests

WP Reposidget (GitHub 仓库挂件): an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲11513.32 ▼0.951.72 ▼0.1842.14 ▼2.22
Dashboard /wp-admin2,265 ▲774.88 ▼1.00112.10 ▼2.4839.11 ▼8.14
Posts /wp-admin/edit.php2,095 ▲32.00 ▼0.0140.36 ▲3.5134.21 ▼2.82
Add New Post /wp-admin/post-new.php1,584 ▲5123.32 ▲0.15647.61 ▼64.2350.26 ▼9.80
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0296.41 ▼12.1841.55 ▼1.80
WP Reposidget /wp-admin/options-general.php?page=wp-reposidget-options8452.2024.5228.66

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • wp_reposidget_github_token
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-reposidget/wp-reposidget.php:225

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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: Add images for these screenshots: #1 (Use shortcode to insert reposidget into the post/page.), #2 (The look of a reposidget.), #3 (Generate a GitHub personal access token.)
You can take inspiration from this readme.txt

wp-reposidget/wp-reposidget.php Passed 13 tests

The primary PHP file in "WP Reposidget (GitHub 仓库挂件)" version 2.1.1 is used by WordPress to initiate all plugin functionality
113 characters long description:
Insert GitHub repository widget into you posts/pages. 在 WordPress 文章/页面中插入 GitHub 项目挂件。

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin776 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS2400335
PHP1299195
JavaScript4206120
PO File1253072
HTML20038
SVG10016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 compressed PNG files occupy 0.03MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png9.61KB9.48KB▼ 1.30%
screenshot-1.png12.49KB12.53KB0.00%
screenshot-2.png8.27KB8.20KB▼ 0.87%