84% frontype

Code Review | Frontype | Select a custom post type as a front page

WordPress plugin Frontype | Select a custom post type as a front page scored84%from 54 tests.

About plugin

  • Plugin page: frontype
  • Plugin version: 0.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: May 23, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 8
  • Update frequency: every 55.3 days
  • Top authors: giuse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /723 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by Frontype | Select a custom post type as a front page
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0045.92 ▲3.27
Dashboard /wp-admin3.32 ▲0.0251.33 ▼4.35
Posts /wp-admin/edit.php3.37 ▲0.0250.78 ▼1.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0294.49 ▼0.68
Media Library /wp-admin/upload.php3.25 ▲0.0237.27 ▲0.54
Reading /wp-admin/options-general.php?page=frontype3.2632.59

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Frontype | Select a custom post type as a front page: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.371.79 ▲0.0645.67 ▲5.90
Dashboard /wp-admin2,192 ▲155.67 ▲0.0189.65 ▼9.9939.76 ▼5.67
Posts /wp-admin/edit.php2,103 ▲31.95 ▼0.0839.08 ▲2.3135.15 ▼3.90
Add New Post /wp-admin/post-new.php1,526 ▼023.23 ▲0.03660.39 ▼19.6362.24 ▲11.24
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.04100.53 ▼2.2342.83 ▼3.13
Reading /wp-admin/options-general.php?page=frontype9982.0126.1431.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=frontype
    • > Notice in wp-content/plugins/frontype/admin/frontype-options.php+9
    Undefined variable: title

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Donate link: Please fix this invalid url: "buymeacoffee.com/josem"
You can take inspiration from this readme.txt

frontype/frontype.php Passed 13 tests

The main file in "Frontype | Select a custom post type as a front page" v. 0.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
50 characters long description:
It lets you set a custom post type as a front page

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
Everything looks great! No dangerous files found in this plugin224 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP41024224

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
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 functions133.33%
▷ Anonymous functions266.67%
Constants1
▷ 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
There are no PNG files in this plugin