83% custom-post-type-add-on-for-badgeos

Code Review | Custom Post Type Add-On for BadgeOS

WordPress plugin Custom Post Type Add-On for BadgeOS scored83%from 54 tests.

About plugin

  • Plugin page: custom-post-type-...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.5.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Nov 23, 2020
  • Latest release: Nov 23, 2020
  • Number of updates: 4
  • Update frequency: every 2.5 days
  • Top authors: konnektiv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /380 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.64ms] Passed 4 tests

A check of server-side resources used by Custom Post Type Add-On for BadgeOS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0045.57 ▼9.97
Dashboard /wp-admin59.95 ▲56.6011,707,451.00 ▲11,707,397.87
Posts /wp-admin/edit.php3.40 ▲0.0049.98 ▼2.09
Add New Post /wp-admin/post-new.php5.93 ▲0.0085.47 ▼18.19
Media Library /wp-admin/upload.php3.27 ▲0.0042.00 ▲3.68

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Post Type Add-On for BadgeOS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.20 ▼0.151.69 ▼0.2942.99 ▼0.28
Dashboard /wp-admin2,189 ▲95.65 ▼0.01101.37 ▲6.8146.90 ▲2.91
Posts /wp-admin/edit.php2,100 ▼02.13 ▲0.1134.38 ▼6.1838.15 ▲0.92
Add New Post /wp-admin/post-new.php1,534 ▲818.36 ▼4.60664.31 ▲3.9474.11 ▲13.71
Media Library /wp-admin/upload.php1,403 ▲34.21 ▼0.02111.08 ▲5.2345.97 ▲4.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/custom-post-type-add-on-for-badgeos/badgeos-cpt.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
The official readme.txt might help

custom-post-type-add-on-for-badgeos/badgeos-cpt.php 85% from 13 tests

Analyzing the main PHP file in "Custom Post Type Add-On for BadgeOS" version 1.0.2
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("custom-post-type-add-on-for-badgeos.php" instead of "badgeos-cpt.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected360 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3159248350
JSON10010

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity18.67
▷ Minimum class complexity5.00
▷ Maximum class complexity32.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods310.71%
▷ Public methods2278.57%
▷ Protected methods00.00%
▷ Private methods621.43%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin