84% my-default-post-content

Code Review | My Default Post Content

WordPress plugin My Default Post Content scored84%from 54 tests.

About plugin

  • Plugin page: my-default-post-c...
  • Plugin version: 0.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Oct 28, 2012
  • Latest release: Aug 9, 2023
  • Number of updates: 34
  • Update frequency: every 115.8 days
  • Top authors: mrdenny (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active /10,240 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼10.82ms] Passed 4 tests

An overview of server-side resources used by My Default Post Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.78 ▼7.22
Dashboard /wp-admin3.35 ▲0.0157.20 ▼10.59
Posts /wp-admin/edit.php3.41 ▲0.0549.60 ▲0.12
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.98 ▼18.11
Media Library /wp-admin/upload.php3.28 ▲0.0532.58 ▼7.36
My Default Post Content /wp-admin/options-general.php?page=defaultpostcontent3.2436.67

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
defaultpostcontent_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by My Default Post Content
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.262.03 ▲0.3145.38 ▲1.72
Dashboard /wp-admin2,196 ▲165.53 ▼0.05107.88 ▲16.6844.58 ▲1.59
Posts /wp-admin/edit.php2,101 ▼22.02 ▲0.0135.16 ▼6.0932.70 ▼7.82
Add New Post /wp-admin/post-new.php1,529 ▲323.44 ▲0.54699.42 ▼13.6052.08 ▲2.82
Media Library /wp-admin/upload.php1,404 ▲14.19 ▼0.0397.52 ▼3.0843.33 ▼0.74
My Default Post Content /wp-admin/options-general.php?page=defaultpostcontent8481.9925.5226.14

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • defaultpostcontent_options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/my-default-post-content/my-default-post-content.php:186

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: email

my-default-post-content/my-default-post-content.php Passed 13 tests

The principal PHP file in "My Default Post Content" v. 0.7.3 is loaded by WordPress automatically on each request
50 characters long description:
Sets default title and content for new blog posts.

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
There were no executable files found in this plugin129 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15313129

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected