87% wp-born-babies

Code Review | Installation

WordPress plugin Installation scored 87% from 54 tests.

About plugin

  • Plugin page: wp-born-babies
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Jun 26, 2014
  • Latest release: Jun 26, 2014
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: webcodeman (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

10+ active / 607 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.23MB] [CPU: ▼153.17ms] Passed 4 tests

An overview of server-side resources used by Installation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.1135.43 ▲3.01
Dashboard /wp-admin3.18 ▲0.1239.88 ▼4.02
Posts /wp-admin/edit.php3.29 ▲0.1845.09 ▼2.58
Add New Post /wp-admin/post-new.php4.16 ▼1.2847.05 ▼609.09
Media Library /wp-admin/upload.php3.12 ▲0.1235.02 ▲6.44
Add New /wp-admin/post-new.php?post_type=baby3.0535.82
Babies /wp-admin/edit.php?post_type=baby3.1633.13

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Installation: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,716 ▲12016.15 ▲0.188.82 ▼0.9845.60 ▼1.83
Dashboard /wp-admin3,003 ▲726.00 ▼0.13133.13 ▼6.35115.90 ▲3.26
Posts /wp-admin/edit.php2,772 ▲332.70 ▼0.0067.39 ▲0.3491.03 ▲2.72
Add New Post /wp-admin/post-new.php1,522 ▲2218.54 ▲0.04355.32 ▼8.52109.67 ▲0.68
Media Library /wp-admin/upload.php1,840 ▲305.01 ▲0.00153.16 ▲7.60115.50 ▼0.32
Add New /wp-admin/post-new.php?post_type=baby3,2314.85135.41107.60
Babies /wp-admin/edit.php?post_type=baby1,4552.6166.3470.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=baby
    • > Notice in wp-content/plugins/wp-born-babies/newbornbabies.php+838
    Undefined index: eventmeta_noncename

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 items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-born-babies/templates/single_baby.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-born-babies/newbornbabies.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

wp-born-babies/newbornbabies.php 85% from 13 tests

"Installation" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 145 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-born-babies.php" instead of "newbornbabies.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected640 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2180198640

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions41
▷ Named functions41100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.64MB with 0.59MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/quote_open.png27.28KB0.46KB▼ 98.30%
screenshot-2.png79.54KB8.18KB▼ 89.72%
screenshot-3.png461.28KB56.65KB▼ 87.72%
images/quote_close.png26.96KB0.31KB▼ 98.86%
screenshot-1.png57.09KB6.80KB▼ 88.10%