77% aitu-releated-posts-with-thumbnails

Code Review | Related Posts with thumbnails of Aitu 爱徒社会化相关文章推荐插件

WordPress plugin Related Posts with thumbnails of Aitu 爱徒社会化相关文章推荐插件 scored77%from 54 tests.

About plugin

  • Plugin page: aitu-releated-pos...
  • Plugin version:
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Sep 17, 2012
  • Latest release: Sep 18, 2012
  • Number of updates: 13
  • Update frequency: every 0.2 days
  • Top authors: hatcloud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,252 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼9.25ms] Passed 4 tests

A check of server-side resources used by Related Posts with thumbnails of Aitu 爱徒社会化相关文章推荐插件
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1039.11 ▼3.04
Dashboard /wp-admin3.40 ▲0.0546.44 ▼17.51
Posts /wp-admin/edit.php3.51 ▲0.1549.03 ▲1.36
Add New Post /wp-admin/post-new.php5.98 ▲0.0983.71 ▼15.55
Media Library /wp-admin/upload.php3.32 ▲0.0934.98 ▼0.90

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Related Posts with thumbnails of Aitu 爱徒社会化相关文章推荐插件
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.11 ▼1.192.13 ▲0.2243.15 ▲3.39
Dashboard /wp-admin2,210 ▲254.82 ▼1.00111.47 ▲11.8243.42 ▼0.32
Posts /wp-admin/edit.php2,096 ▲252.06 ▲0.0139.81 ▲2.1141.50 ▲6.13
Add New Post /wp-admin/post-new.php1,522 ▲323.05 ▼0.02648.54 ▼10.2454.04 ▼0.61
Media Library /wp-admin/upload.php1,392 ▲44.17 ▼0.1496.51 ▼4.4844.98 ▲0.31
爱徒相关文章 /wp-admin/aitu-related-posts.php260.440.0813.44

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/aitu-releated-posts-with-thumbnails/aitu-related-posts.php on line 625
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/aitu-releated-posts-with-thumbnails/aitu-related-posts.php on line 625
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/aitu-releated-posts-with-thumbnails/aitu-related-posts.php on line 625

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/aitu-related-posts.php
    • > Network (severe)
    wp-admin/aitu-related-posts.php - Failed to load resource: the server responded with a status of 404 (Not Found)


Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Screenshot #1 (**汉唐月**) image not found
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt might help

aitu-releated-posts-with-thumbnails/aitu-related-posts.php 77% from 13 tests

The main PHP script in "Related Posts with thumbnails of Aitu 爱徒社会化相关文章推荐插件" version is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("aitu-releated-posts-with-thumbnails.php" instead of "aitu-related-posts.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 144 characters long)
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 84 characters long)

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 detected581 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity26.33
▷ Minimum class complexity2.00
▷ Maximum class complexity75.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods2250.00%
▷ Protected methods00.00%
▷ Private methods2250.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.20MB with 0.14MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png200.42KB60.22KB▼ 69.95%