93% custom-post-type-ecards

Code Review | Custom Post Type eCards

WordPress plugin Custom Post Type eCards scored 93% from 54 tests.

About plugin

  • Plugin page: custom-post-type-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 5.9.2
  • First release: May 23, 2018
  • Latest release: May 30, 2018
  • Number of updates: 20
  • Update frequency: every 0.4 days
  • Top authors: rockonit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 499 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼295.70ms] Passed 4 tests

This is a short check of server-side resources used by Custom Post Type eCards
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0857.73 ▲5.20
Dashboard /wp-admin3.49 ▲0.0840.72 ▲6.46
Posts /wp-admin/edit.php3.72 ▲0.0837.81 ▲0.43
Add New Post /wp-admin/post-new.php6.95 ▼0.0296.90 ▼1,184.32
Media Library /wp-admin/upload.php3.37 ▲0.0725.16 ▼4.11
All ecards /wp-admin/edit.php?post_type=ecards3.4125.87
Ecards Category /wp-admin/edit-tags.php?taxonomy=ecards-categories&post_type=ecards3.4825.03
Add New /wp-admin/post-new.php?post_type=ecards3.7546.62

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: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Custom Post Type eCards
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,841 ▲11916.22 ▲0.485.94 ▼0.092.13 ▼0.30
Dashboard /wp-admin2,946 ▲856.15 ▼0.01117.68 ▼16.02156.74 ▼5.02
Posts /wp-admin/edit.php2,747 ▲563.24 ▲0.0163.80 ▲0.43140.51 ▼5.29
Add New Post /wp-admin/post-new.php1,788 ▲12721.69 ▲4.53424.70 ▼0.54153.67 ▼4.53
Media Library /wp-admin/upload.php1,755 ▲605.55 ▲0.06141.49 ▼6.99184.28 ▼9.45
All ecards /wp-admin/edit.php?post_type=ecards1,4803.1658.90116.72
Ecards Category /wp-admin/edit-tags.php?taxonomy=ecards-categories&post_type=ecards1,6782.7655.32112.91
Add New /wp-admin/post-new.php?post_type=ecards3,58410.05195.16222.05

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

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

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 | 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 trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-post-type-ecards/custom_type_post_ecards.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: You can take inspiration from this readme.txt

custom-post-type-ecards/custom_type_post_ecards.php 85% from 13 tests

The principal PHP file in "Custom Post Type eCards" v. 1.0.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("custom-post-type-ecards.php" instead of "custom_type_post_ecards.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 196 characters long)

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
Everything looks great! No dangerous files found in this plugin237 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2424237

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions7
▷ Named functions7100.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
There are no PNG files in this plugin