78% remove-cpt-base

Code Review | Remove CPT base

WordPress plugin Remove CPT base scored78%from 54 tests.

About plugin

  • Plugin page: remove-cpt-base
  • Plugin version: 6.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 6, 2017
  • Latest release: Oct 25, 2023
  • Number of updates: 79
  • Update frequency: every 27.6 days
  • Top authors: kubiq (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

8,000+ active /47,200 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 gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.57ms] Passed 4 tests

This is a short check of server-side resources used by Remove CPT base
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.73 ▲1.93
Dashboard /wp-admin3.36 ▲0.0147.57 ▼11.30
Posts /wp-admin/edit.php3.41 ▲0.0545.34 ▼2.83
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.17 ▼0.69
Media Library /wp-admin/upload.php3.29 ▲0.0536.04 ▲0.55

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Remove CPT base
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲4714.14 ▼0.402.07 ▼0.0346.49 ▲5.16
Dashboard /wp-admin2,202 ▲275.58 ▼0.1393.41 ▼6.0243.73 ▲0.90
Posts /wp-admin/edit.php2,104 ▲71.99 ▼0.0233.89 ▼2.1433.96 ▼0.50
Add New Post /wp-admin/post-new.php1,531 ▲323.06 ▼0.24677.39 ▲4.4561.77 ▲6.97
Media Library /wp-admin/upload.php1,404 ▲44.22 ▲0.05104.47 ▼4.2745.74 ▼0.60
Remove CPT base /wp-admin/remove-cpt-base.php260.420.1013.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 1× 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/remove-cpt-base/remove-cpt-base.php:299

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/remove-cpt-base.php
    • > Network (severe)
    wp-admin/remove-cpt-base.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: base, permalink, slug, remove, custom post type

remove-cpt-base/remove-cpt-base.php 92% from 13 tests

"Remove CPT base" version 6.4'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:
  • Text Domain: The text domain should only use lowercase characters and dashes

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

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity60.00
▷ Minimum class complexity60.00
▷ Maximum class complexity60.00
Average method complexity6.25
▷ Minimum method complexity2.00
▷ Maximum method complexity15.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%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin