79% placeholder-it-widget

Code Review | Placeholder it

WordPress plugin Placeholder it scored79%from 54 tests.

About plugin

  • Plugin page: placeholder-it-wi...
  • Plugin version: 0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-4.3.1
  • WordPress version: 6.3.1
  • First release: Jun 10, 2016
  • Latest release: Jun 10, 2016
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: jvandemerwe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /830 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.80ms] Passed 4 tests

A check of server-side resources used by Placeholder it
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.24 ▲2.06
Dashboard /wp-admin3.36 ▲0.0143.85 ▼12.68
Posts /wp-admin/edit.php3.47 ▲0.1145.48 ▲1.65
Add New Post /wp-admin/post-new.php5.94 ▲0.0578.06 ▼14.21
Media Library /wp-admin/upload.php3.28 ▲0.0534.68 ▲2.60
Placeholder.it Widget /wp-admin/options-general.php?page=placeholder_it_widget3.2528.69

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
placeholder_it_widget_basics
theysaidso_admin_options
widget_recent-comments
widget_placeholder-it-widget
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Placeholder it
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.80 ▲0.451.68 ▼0.0644.98 ▼2.48
Dashboard /wp-admin2,220 ▲395.81 ▲0.1290.72 ▼10.3736.51 ▼6.87
Posts /wp-admin/edit.php2,132 ▲322.33 ▲0.3341.56 ▲7.3334.70 ▼0.12
Add New Post /wp-admin/post-new.php1,545 ▲1723.49 ▲0.37589.87 ▼56.3133.73 ▼17.20
Media Library /wp-admin/upload.php1,428 ▲284.41 ▲0.18102.73 ▲6.4043.26 ▲1.30
Placeholder.it Widget /wp-admin/options-general.php?page=placeholder_it_widget1,1742.4564.1431.14

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
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • placeholder_it_widget_basics
    • widget_recent-posts
    • widget_recent-comments
    • widget_placeholder-it-widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/placeholder-it-widget/placeholder-it-widget.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/placeholder-it-widget/widget/widget.placeholder-it-widget.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=placeholder_it_widget
    • > Network (severe)
    wp-content/plugins/placeholder-it-widget/admin.css - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: development, placeholder

placeholder-it-widget/placeholder-it-widget.php Passed 13 tests

Analyzing the main PHP file in "Placeholder it" version 0.9
95 characters long description:
Simple widget to add placeholders using placeholder.it webservice during development of a site.

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 plugin998 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5217280856
PO File14242128
CSS22214

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity19.40
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods60
▷ Static methods11.67%
▷ Public methods5388.33%
▷ Protected methods35.00%
▷ Private methods46.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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
No PNG images were found in this plugin