84% themencode-register-all-post-types

Code Review | Register All Post Types by ThemeNcode

WordPress plugin Register All Post Types by ThemeNcode scored84%from 54 tests.

About plugin

  • Plugin page: themencode-regist...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Feb 20, 2017
  • Latest release: May 18, 2021
  • Number of updates: 9
  • Update frequency: every 172.0 days
  • Top authors: abdulawal39 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /568 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.75ms] Passed 4 tests

Server-side resources used by Register All Post Types by ThemeNcode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.80 ▲0.27
Dashboard /wp-admin3.31 ▲0.0147.12 ▼0.50
Posts /wp-admin/edit.php3.36 ▲0.0145.59 ▼1.13
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.48 ▼1.36
Media Library /wp-admin/upload.php3.23 ▲0.0035.64 ▼0.00

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Register All Post Types by ThemeNcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.51 ▼0.891.84 ▼0.1344.91 ▼4.17
Dashboard /wp-admin2,209 ▲215.91 ▲0.04100.35 ▼10.1737.02 ▼4.43
Posts /wp-admin/edit.php2,089 ▲31.99 ▼0.0236.37 ▲1.4934.27 ▲0.32
Add New Post /wp-admin/post-new.php1,547 ▲1418.42 ▼4.54625.78 ▼47.5268.19 ▲17.45
Media Library /wp-admin/upload.php1,385 ▼34.15 ▼0.0798.27 ▼1.2141.38 ▼1.97

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themencode-register-all-post-types/themencode-register-all-post-types.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: create all post types from database, db post types creation, unavailable post types creation

themencode-register-all-post-types/themencode-register-all-post-types.php Passed 13 tests

The main PHP file in "Register All Post Types by ThemeNcode" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
135 characters long description:
This plugin will check database for all the post types and create the ones that are not registered using register_post_type() function.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin21 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171521

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
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

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