84% customposttypearchive

Code Review | CustomPostTypeArchive

WordPress plugin CustomPostTypeArchive scored84%from 54 tests.

About plugin

  • Plugin page: customposttypearc...
  • Plugin version: 1.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-4.9.5
  • WordPress version: 6.3.1
  • First release: Mar 6, 2018
  • Latest release: Apr 18, 2018
  • Number of updates: 18
  • Update frequency: every 11.1 days
  • Top authors: naho03 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /836 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.23MB] [CPU: ▼19.60ms] Passed 4 tests

A check of server-side resources used by CustomPostTypeArchive
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.79 ▼0.6814.79 ▼24.80
Dashboard /wp-admin3.32 ▲0.0145.05 ▼2.72
Posts /wp-admin/edit.php3.08 ▼0.2826.22 ▼24.96
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.05 ▼25.92
Media Library /wp-admin/upload.php3.24 ▲0.0136.56 ▲2.40

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for CustomPostTypeArchive
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.24 ▼1.132.00 ▲0.2037.26 ▼2.67
Dashboard /wp-admin2,209 ▲215.85 ▲0.9697.19 ▼5.5238.60 ▼4.62
Posts /wp-admin/edit.php2,086 ▼32.04 ▼0.0334.76 ▼6.1034.97 ▼2.15
Add New Post /wp-admin/post-new.php1,521 ▼2123.36 ▲5.20588.46 ▼15.2559.18 ▲3.79
Media Library /wp-admin/upload.php1,388 ▲64.18 ▼0.0295.33 ▼7.6843.55 ▼0.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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 add_filter() in wp-content/plugins/customposttypearchive/custom-post-type-archive.php:86

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: posttype, widget, post, post_type, archive...

customposttypearchive/custom-post-type-archive.php 85% from 13 tests

Analyzing the main PHP file in "CustomPostTypeArchive" version 1.1
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 347 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("customposttypearchive.php" instead of "custom-post-type-archive.php")

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
Success! There were no dangerous files found in this plugin52 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP183352

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin