89% post-type-spotlight

Code Review | Post Type Spotlight

WordPress plugin Post Type Spotlight scored 89% from 54 tests.

About plugin

  • Plugin page: post-type-spotlight
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3
  • WordPress version: 6.3.1
  • First release: Feb 25, 2013
  • Latest release: Aug 19, 2023
  • Number of updates: 40
  • Update frequency: every 95.7 days
  • Top authors: desrosj (95%)linchpin_agency (7.5%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 10,325 total downloads

Benchmarks

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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼2.97ms] Passed 4 tests

Server-side resources used by Post Type Spotlight
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1842.26 ▲0.80
Dashboard /wp-admin3.46 ▲0.1649.59 ▼1.79
Posts /wp-admin/edit.php3.59 ▲0.2351.90 ▲4.29
Add New Post /wp-admin/post-new.php6.03 ▲0.1489.09 ▼14.62
Media Library /wp-admin/upload.php3.39 ▲0.1639.15 ▲3.73

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_pts_featured_posts_widget
pts_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Type Spotlight
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,215 ▲48028.37 ▲13.9936.33 ▲34.5039.78 ▲2.47
Dashboard /wp-admin2,357 ▲17213.81 ▲8.94194.66 ▲88.1343.52 ▼0.17
Posts /wp-admin/edit.php2,297 ▲20812.63 ▲10.62111.60 ▲70.8535.29 ▼0.34
Add New Post /wp-admin/post-new.php1,538 ▲2418.11 ▲0.58508.32 ▼104.6937.09 ▼11.82
Media Library /wp-admin/upload.php1,528 ▲14314.06 ▲9.88154.30 ▲52.8447.00 ▲3.48

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 8 options in the database
    • widget_recent-comments
    • pts_version
    • can_compress_scripts
    • widget_pts_featured_posts_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
5 plugin tags: posts, sticky, custom post types, featured, post type

post-type-spotlight/post-type-spotlight.php 77% from 13 tests

The main file in "Post Type Spotlight" v. 3.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.1.0" instead of "5.1")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Description: The description should be shorter than 140 characters (currently 203 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin2,074 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP163416451,283
JavaScript3169170549
JSON100154
Markdown338088
CSS1100

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity25.43
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods74
▷ Static methods1925.68%
▷ Public methods7195.95%
▷ Protected methods00.00%
▷ Private methods34.05%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants6
▷ Global constants6100.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
PNG images were not found in this plugin