83% naveed-post-types

Code Review | Naveed Post Types

WordPress plugin Naveed Post Types scored83%from 54 tests.

About plugin

  • Plugin page: naveed-post-types
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 5, 2022
  • Latest release: Mar 30, 2023
  • Number of updates: 11
  • Update frequency: every 16.1 days
  • Top authors: snaveedanjum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /561 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.63MB] [CPU: ▲7.39ms] Passed 4 tests

An overview of server-side resources used by Naveed Post Types
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2053.91 ▲8.47
Dashboard /wp-admin4.12 ▲0.8165.36 ▲11.57
Posts /wp-admin/edit.php4.15 ▲0.7964.66 ▲15.65
Add New Post /wp-admin/post-new.php6.65 ▲0.7698.92 ▼6.12
Media Library /wp-admin/upload.php3.98 ▲0.7553.17 ▲17.05
Taxonomies /wp-admin/edit.php?post_type=npt-taxonomy4.0749.17
Post Types /wp-admin/edit.php?post_type=npt-post-type4.0751.65
Register New /wp-admin/admin.php?page=naveed-post-types3.9548.68

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Naveed Post Types
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.42 ▼0.231.72 ▼0.3844.10 ▼2.39
Dashboard /wp-admin2,228 ▲515.56 ▼0.0598.37 ▲4.5271.88 ▲29.53
Posts /wp-admin/edit.php2,142 ▲422.01 ▼0.0135.31 ▼3.2536.70 ▲0.12
Add New Post /wp-admin/post-new.php1,567 ▲3922.97 ▼0.16776.65 ▲85.3853.21 ▲2.75
Media Library /wp-admin/upload.php1,448 ▲484.17 ▼0.0395.55 ▼12.1674.35 ▲26.35
Taxonomies /wp-admin/edit.php?post_type=npt-taxonomy1,2552.1235.2635.55
Post Types /wp-admin/edit.php?post_type=npt-post-type1,2832.1133.7036.51
Register New /wp-admin/admin.php?page=naveed-post-types9651.7925.1333.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • npt_taxonomy_count
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • npt_post_type_count
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/naveed-post-types/includes/ajax.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/naveed-post-types/includes/npt-functions.php:611

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 87% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6 in naveed-post-types/assets to your readme.txt
You can look at the official readme.txt

naveed-post-types/npt.php 85% from 13 tests

"Naveed Post Types" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("naveed-post-types.php" instead of "npt.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected6,149 lines of code in 87 files:
LanguageFilesBlank linesComment linesLines of code
PHP133537594,497
SVG720721,051
CSS1151482
JavaScript143119

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity27.70
▷ Minimum class complexity2.00
▷ Maximum class complexity103.00
Average method complexity4.81
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods70
▷ Static methods11.43%
▷ Public methods70100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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