84% restful-hello-dolly

Code Review | Restful Hello Dolly

WordPress plugin Restful Hello Dolly scored84%from 54 tests.

About plugin

  • Plugin page: restful-hello-dolly
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4
  • WordPress version: 6.3.1
  • First release: Feb 6, 2016
  • Latest release: Feb 6, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: whyisjake (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,645 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.01MB] [CPU: ▼3.70ms] Passed 4 tests

This is a short check of server-side resources used by Restful Hello Dolly
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.91 ▲0.30
Dashboard /wp-admin3.32 ▲0.0148.41 ▼1.57
Posts /wp-admin/edit.php3.37 ▲0.0146.53 ▲2.61
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.77 ▼13.21
Media Library /wp-admin/upload.php3.24 ▲0.0134.79 ▼0.32

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Restful Hello Dolly
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.031.66 ▼0.0345.12 ▼1.36
Dashboard /wp-admin2,209 ▲215.92 ▲0.02100.09 ▼2.4737.97 ▼0.22
Posts /wp-admin/edit.php2,089 ▲32.04 ▲0.0732.94 ▼5.5833.66 ▼2.32
Add New Post /wp-admin/post-new.php1,533 ▲1323.34 ▲0.22608.07 ▲19.1352.20 ▼1.90
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.0195.23 ▼2.7040.91 ▼4.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restful-hello-dolly/restful-hello-dolly.php:85

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (What a response could look like.)
The official readme.txt might help

restful-hello-dolly/restful-hello-dolly.php 92% from 13 tests

The principal PHP file in "Restful Hello Dolly" v. 0.5 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin28 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1114628

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot.png132.57KB42.74KB▼ 67.76%