83% as-related-posts-block

Code Review | AS Related Posts Block

WordPress plugin AS Related Posts Block scored83%from 54 tests.

About plugin

  • Plugin page: as-related-posts-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.3-5.0.3
  • WordPress version: 6.3.1
  • First release: Feb 18, 2019
  • Latest release: Feb 18, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: talentedaamer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /759 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Server-side resources used by AS Related Posts Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.54 ▼5.71
Dashboard /wp-admin3.31 ▲0.0143.73 ▼6.76
Posts /wp-admin/edit.php3.36 ▲0.0139.89 ▼9.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.83 ▼13.76
Media Library /wp-admin/upload.php3.23 ▲0.0135.44 ▲1.18

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AS Related Posts Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8114.81 ▲0.061.93 ▲0.1339.99 ▼4.21
Dashboard /wp-admin2,209 ▲185.84 ▲0.9999.48 ▼9.3241.31 ▼0.66
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0133.46 ▼2.9831.74 ▼5.38
Add New Post /wp-admin/post-new.php6,186 ▲4,64421.04 ▲2.72954.11 ▲315.5739.20 ▼15.34
Media Library /wp-admin/upload.php1,388 ▼34.25 ▲0.0396.29 ▼1.8441.68 ▼1.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/as-related-posts-block/inc/asrpb-related-posts.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: The official readme.txt is a good inspiration

as-related-posts-block/as-related-posts-block.php 85% from 13 tests

The entry point to "AS Related Posts Block" version 1.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 153 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin159 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short 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.50
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods125.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions375.00%
▷ Anonymous functions125.00%
▷ Global constants3100.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
No PNG images were found in this plugin