78% apoyl-badurl

Code Review | 生成死链接死链提交

WordPress plugin 生成死链接死链提交 scored78%from 54 tests.

About plugin

  • Plugin page: apoyl-badurl
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.4
  • WordPress version: 6.3.1
  • First release: Aug 24, 2022
  • Latest release: Nov 23, 2023
  • Number of updates: 6
  • Update frequency: every 76.0 days
  • Top authors: apoyl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /499 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.89ms] Passed 4 tests

An overview of server-side resources used by 生成死链接死链提交
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0343.11 ▲0.92
Dashboard /wp-admin3.34 ▲0.0446.01 ▼3.92
Posts /wp-admin/edit.php3.46 ▲0.1048.12 ▼1.33
Add New Post /wp-admin/post-new.php5.93 ▲0.0390.15 ▼19.24
Media Library /wp-admin/upload.php3.27 ▲0.0336.19 ▲4.47
settings /wp-admin/options-general.php?page=apoyl-badurl-settings3.2431.49

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
apoyl-badurl-settings

Browser metrics Passed 4 tests

Checking browser requirements for 生成死链接死链提交
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4714.70 ▲0.421.76 ▲0.1047.11 ▲4.47
Dashboard /wp-admin2,199 ▲225.63 ▼0.0291.97 ▲2.7142.62 ▲0.08
Posts /wp-admin/edit.php2,104 ▲41.94 ▼0.0740.46 ▼1.1636.91 ▼1.15
Add New Post /wp-admin/post-new.php1,534 ▼123.39 ▼1.66628.22 ▲29.4449.56 ▼17.58
Media Library /wp-admin/upload.php1,404 ▲14.21 ▲0.0795.63 ▼0.7943.33 ▲0.63
settings /wp-admin/options-general.php?page=apoyl-badurl-settings8611.9622.4635.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

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=apoyl-badurl-settings
    • > Notice in wp-content/plugins/apoyl-badurl/admin/partials/admin-display.php+28
    Undefined variable: updateflag

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/apoyl-badurl/admin/partials/admin-display.php:21

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: seo

apoyl-badurl/apoyl-badurl.php 92% from 13 tests

The main PHP script in "生成死链接死链提交" version 1.4.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 145 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected240 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP1190126237
JavaScript1203

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods312.50%
▷ Public methods2083.33%
▷ Protected methods00.00%
▷ Private methods416.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin