84% podamibe-custom-post

Code Review | Podamibe Custom Post

WordPress plugin Podamibe Custom Post scored84%from 54 tests.

About plugin

  • Plugin page: podamibe-custom-post
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Sep 28, 2016
  • Latest release: May 22, 2019
  • Number of updates: 12
  • Update frequency: every 80.6 days
  • Top authors: podamibe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /858 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼4.17ms] Passed 4 tests

An overview of server-side resources used by Podamibe Custom Post
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1647.50 ▲2.13
Dashboard /wp-admin3.46 ▲0.1150.78 ▼9.60
Posts /wp-admin/edit.php3.52 ▲0.1652.67 ▲4.98
Add New Post /wp-admin/post-new.php6.04 ▲0.1695.17 ▼9.34
Media Library /wp-admin/upload.php3.39 ▲0.1637.99 ▲0.12
All Custom Post /wp-admin/edit.php?post_type=cpt3.4342.33
Add New Custom Post /wp-admin/post-new.php?post_type=cpt3.4246.98

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

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

Browser metrics Passed 4 tests

Podamibe Custom Post: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7314.41 ▲0.171.87 ▲0.0944.91 ▲1.37
Dashboard /wp-admin2,219 ▲455.55 ▼0.0687.59 ▼11.7139.63 ▼0.58
Posts /wp-admin/edit.php2,127 ▲272.09 ▲0.1335.68 ▼4.8032.63 ▼12.89
Add New Post /wp-admin/post-new.php1,549 ▲2123.48 ▲0.45617.74 ▼15.9851.17 ▼9.73
Media Library /wp-admin/upload.php1,430 ▲304.17 ▼0.0296.63 ▼3.3945.59 ▲4.45
All Custom Post /wp-admin/edit.php?post_type=cpt1,1001.9535.5029.76
Add New Custom Post /wp-admin/post-new.php?post_type=cpt1,7802.6257.2259.53

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/podamibe-custom-post/custom-post.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
8 plugin tags: podamibe, post, custom post type, podamibe custom post type, custom...

podamibe-custom-post/custom-post.php 85% from 13 tests

The main PHP file in "Podamibe Custom Post" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("podamibe-custom-post.php" instead of "custom-post.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected569 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP510669569

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin