84% front-page-custom-post-type

Code Review | Front Page Custom Post Type

WordPress plugin Front Page Custom Post Type scored84%from 54 tests.

About plugin

  • Plugin page: front-page-custom...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Oct 7, 2016
  • Latest release: Sep 18, 2023
  • Number of updates: 11
  • Update frequency: every 230.6 days
  • Top authors: celloexpressions (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /4,039 total downloads

Benchmarks

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.00MB] [CPU: ▼9.57ms] Passed 4 tests

Server-side resources used by Front Page Custom Post Type
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.82 ▲0.56
Dashboard /wp-admin3.31 ▲0.0145.05 ▼6.09
Posts /wp-admin/edit.php3.36 ▲0.0047.40 ▼2.94
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.67 ▼29.79
Media Library /wp-admin/upload.php3.23 ▲0.0040.07 ▲6.78

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Front Page Custom Post Type
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▲0.171.89 ▲0.0442.98 ▼0.25
Dashboard /wp-admin2,195 ▲295.65 ▲0.0481.91 ▼19.3537.60 ▼8.46
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0237.53 ▲0.4436.03 ▲0.56
Add New Post /wp-admin/post-new.php1,529 ▲323.32 ▼0.23675.10 ▲0.1550.72 ▲0.50
Media Library /wp-admin/upload.php1,400 ▲64.12 ▼0.06112.37 ▲14.1948.06 ▲4.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/front-page-custom-post-type/front-page-custom-post-type.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: home, custom post type, front page

front-page-custom-post-type/front-page-custom-post-type.php Passed 13 tests

"Front Page Custom Post Type" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
85 characters long description:
Select a custom post type to be displayed in place of latest posts on the front page.

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
Everything looks great! No dangerous files found in this plugin40 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1112840

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin