90% ams-single-post-template-selector

Code Review | AMS Single Post Template Selector

WordPress plugin AMS Single Post Template Selector scored90%from 54 tests.

About plugin

  • Plugin page: ams-single-post-t...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.9
  • WordPress version: 6.3.1
  • First release: Sep 5, 2016
  • Latest release: Jan 23, 2022
  • Number of updates: 19
  • Update frequency: every 103.5 days
  • Top authors: manojsv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,853 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by AMS Single Post Template Selector
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.94 ▼1.97
Dashboard /wp-admin3.33 ▲0.0346.99 ▼2.25
Posts /wp-admin/edit.php3.38 ▲0.0247.09 ▼1.72
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.48 ▼10.21
Media Library /wp-admin/upload.php3.26 ▲0.0237.40 ▲0.42

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for AMS Single Post Template Selector
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.291.73 ▼0.0843.38 ▼9.09
Dashboard /wp-admin2,206 ▲154.85 ▼0.02102.32 ▼5.2639.43 ▼7.07
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0340.26 ▼0.6135.28 ▼0.15
Add New Post /wp-admin/post-new.php1,528 ▼518.40 ▼4.81605.41 ▼107.0653.92 ▲1.47
Media Library /wp-admin/upload.php1,391 ▼04.21 ▲0.0196.94 ▼7.8241.15 ▼2.60

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found


Plugin configuration 97% 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:
  • Tags: You are using too many tags: 17 tag instead of maximum 10
Please take inspiration from this readme.txt

ams-single-post-template-selector/ams-single-post-template-selector.php Passed 13 tests

"AMS Single Post Template Selector" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
63 characters long description:
Plugin allows to choose different template for individual post.

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

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity11.00
▷ Minimum class complexity2.00
▷ Maximum class complexity20.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods19.09%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected