83% mpress-custom-front-page

Code Review | Custom Front Page

WordPress plugin Custom Front Page scored83%from 54 tests.

About plugin

  • Plugin page: mpress-custom-fro...
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6
  • WordPress version: 6.3.1
  • First release: Oct 5, 2012
  • Latest release: Dec 13, 2020
  • Number of updates: 12
  • Update frequency: every 249.3 days
  • Top authors: wpscholar (66.67%)woodent (41.67%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /23,597 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.56ms] Passed 4 tests

Server-side resources used by Custom Front Page
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.90 ▼5.70
Dashboard /wp-admin3.32 ▲0.0245.08 ▼2.27
Posts /wp-admin/edit.php3.37 ▲0.0243.29 ▼0.50
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.83 ▼8.76
Media Library /wp-admin/upload.php3.25 ▲0.0233.14 ▼1.52

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 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

A check of browser resources used by Custom Front Page
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.59 ▼0.781.68 ▼0.2541.11 ▼2.61
Dashboard /wp-admin2,203 ▲115.82 ▲0.9498.17 ▼10.8837.56 ▼2.61
Posts /wp-admin/edit.php2,089 ▼01.99 ▲0.0234.74 ▼2.1537.62 ▲6.14
Add New Post /wp-admin/post-new.php1,533 ▼023.06 ▼0.31657.69 ▼17.2952.53 ▼0.70
Media Library /wp-admin/upload.php1,382 ▼64.16 ▼0.0497.60 ▲3.0142.28 ▲2.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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
Even though no errors were found, this is by no means 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpscholar\\CustomFrontPage\\load_plugin_textdomain() in wp-content/plugins/mpress-custom-front-page/mpress-custom-front-page.php:52

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (Using the plugin is simple, just click on 'Reading' under 'Settings' in the WordPress admin and choose the page or post you want for your front page.)
You can take inspiration from this readme.txt

mpress-custom-front-page/mpress-custom-front-page.php 85% from 13 tests

The main PHP file in "Custom Front Page" ver. 1.1.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Domain Path: The domain path must begin with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin67 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1176167

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.33
▷ Minimum method complexity2.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods466.67%
▷ Protected methods116.67%
▷ Private methods116.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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