78% placehodor

Code Review | PlaceHodor

WordPress plugin PlaceHodor scored 78% from 54 tests.

About plugin

  • Plugin page: placehodor
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.0
  • WordPress version: 6.3.1
  • First release: Jul 16, 2021
  • Latest release: Jun 19, 2022
  • Number of updates: 7
  • Update frequency: every 48.3 days
  • Top authors: xuxu.fr (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active / 1,168 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.20MB] [CPU: ▼4.07ms] Passed 4 tests

A check of server-side resources used by PlaceHodor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1841.21 ▼8.76
Dashboard /wp-admin3.52 ▲0.2252.73 ▲1.08
Posts /wp-admin/edit.php3.64 ▲0.2859.64 ▲13.60
Add New Post /wp-admin/post-new.php6.10 ▲0.2187.29 ▼10.52
Media Library /wp-admin/upload.php3.42 ▲0.2038.55 ▲1.93

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 11 new options
New WordPress options
lnjph_plugin_version
widget_recent-posts
lnjph_uninstall_date
lnjph_install
lnjph_install_date
db_upgraded
lnjph_default_post_thumbnail
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for PlaceHodor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,053 ▲30715.28 ▲0.907.33 ▲5.2743.71 ▼2.77
Dashboard /wp-admin2,373 ▲1826.54 ▲1.61135.49 ▲32.4838.12 ▼2.03
Posts /wp-admin/edit.php2,278 ▲1923.36 ▲1.3651.47 ▲14.7929.57 ▼6.50
Add New Post /wp-admin/post-new.php1,549 ▲1923.13 ▲4.95863.13 ▲213.9145.89 ▼7.16
Media Library /wp-admin/upload.php1,461 ▲794.42 ▲0.2493.32 ▼4.7043.15 ▲1.55

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 11 options in the database
    • db_upgraded
    • lnjph_plugin_version
    • lnjph_default_post_thumbnail
    • can_compress_scripts
    • lnjph_uninstall_date
    • lnjph_install_date
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • lnjph_install
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/placehodor/rewrites/placehodor.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant LNJPH_PLUGIN_VERSION - assumed 'LNJPH_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/placehodor/rewrites/placehodor.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/placehodor/rewrites/choose-wisely.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/placehodor/placehodor.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
10 plugin tags: picsumphotos, plugin, replace, image, placeimgcom...

placehodor/placehodor.php 92% from 13 tests

The main PHP file in "PlaceHodor" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 392 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin666 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP650147654
Markdown1509
JavaScript2002
CSS2101

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity98.00
▷ Minimum class complexity98.00
▷ Maximum class complexity98.00
Average method complexity4.34
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods29
▷ Static methods827.59%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png0.95KB0.87KB▼ 8.51%