84% placeholder-content

Code Review | Placeholder Content

WordPress plugin Placeholder Content scored84%from 54 tests.

About plugin

  • Plugin page: placeholder-content
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.1
  • WordPress version: 6.3.1
  • First release: Apr 23, 2015
  • Latest release: Apr 23, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: tfreeman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,049 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.90ms] Passed 4 tests

A check of server-side resources used by Placeholder Content
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.71 ▼0.83
Dashboard /wp-admin3.36 ▲0.0650.35 ▲3.09
Posts /wp-admin/edit.php3.41 ▲0.0642.74 ▼3.96
Add New Post /wp-admin/post-new.php5.94 ▲0.0681.43 ▼13.89
Media Library /wp-admin/upload.php3.29 ▲0.0638.75 ▲5.95

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Placeholder Content: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.66 ▼0.711.88 ▲0.2439.70 ▼1.33
Dashboard /wp-admin2,218 ▲305.79 ▲0.9399.80 ▼3.2376.46 ▲32.89
Posts /wp-admin/edit.php2,104 ▲152.05 ▲0.0835.40 ▼2.8531.92 ▼4.05
Add New Post /wp-admin/post-new.php1,680 ▲15222.40 ▼0.37740.42 ▲78.4157.46 ▼1.71
Media Library /wp-admin/upload.php1,400 ▲124.24 ▲0.06114.41 ▲3.6649.79 ▲1.89

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/placeholder-content/placeholder.php

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 93% from 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
1 plugin tags: lorem ipsum

placeholder-content/placeholder.php 85% from 13 tests

This is the main PHP file of "Placeholder Content" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("placeholder-content.php" instead of "placeholder.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 plugin368 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11417314
PO File1131354

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.25
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1083.33%
▷ Protected methods00.00%
▷ Private methods216.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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
placeholder.png14.26KB0.19KB▼ 98.66%