84% post-type-archive-in-menu

Code Review | Post type archive in menu

WordPress plugin Post type archive in menu scored84%from 54 tests.

About plugin

  • Plugin page: post-type-archive...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-3.4
  • WordPress version: 6.3.1
  • First release: Nov 24, 2012
  • Latest release: Sep 13, 2013
  • Number of updates: 10
  • Update frequency: every 35.6 days
  • Top authors: lpeharda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,369 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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Post type archive in menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.33 ▼1.82
Dashboard /wp-admin3.31 ▲0.0152.56 ▲4.61
Posts /wp-admin/edit.php3.36 ▲0.0149.23 ▲6.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.32 ▲3.48
Media Library /wp-admin/upload.php3.24 ▲0.0134.26 ▲3.48

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post type archive in menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.28 ▼0.281.98 ▲0.3244.23 ▲4.57
Dashboard /wp-admin2,195 ▲215.62 ▲0.0885.83 ▲1.6741.12 ▼1.89
Posts /wp-admin/edit.php2,103 ▼01.96 ▼0.0133.69 ▼10.7431.82 ▼7.84
Add New Post /wp-admin/post-new.php1,526 ▼022.93 ▼0.61615.40 ▼75.7850.38 ▼13.13
Media Library /wp-admin/upload.php1,394 ▼64.14 ▼0.08106.50 ▲7.3545.15 ▲1.30

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-type-archive-in-menu/trunk/post-type-archive-in-menu.php:95
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-type-archive-in-menu/post-type-archive-in-menu.php:95

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === post-type-archive-in-menu === )
You can take inspiration from this readme.txt

post-type-archive-in-menu/post-type-archive-in-menu.php Passed 13 tests

The principal PHP file in "Post type archive in menu" v. 1.0.1 is loaded by WordPress automatically on each request
74 characters long description:
Add post type (custom) archive links easily through WP builtin menu system

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
Good job! No executable or dangerous file extensions detected98 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1265098

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.69MB with 0.44MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png69.13KB23.09KB▼ 66.60%
trunk/assets/screenshot-2.png200.86KB73.46KB▼ 63.43%
assets/screenshot-2.png200.86KB73.46KB▼ 63.43%
assets/banner-772x250.png82.35KB32.38KB▼ 60.68%
trunk/assets/banner-772x250.png85.86KB33.66KB▼ 60.80%