94% cpo-content-types

Code Review | CPO Content Types

WordPress plugin CPO Content Types scored 94% from 54 tests.

About plugin

  • Plugin page: cpo-content-types
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.5
  • WordPress version: 5.9.2
  • First release: Mar 25, 2015
  • Latest release: Nov 5, 2020
  • Number of updates: 25
  • Update frequency: every 82.1 days
  • Top authors: cpothemes (56%)machothemes (44%)wpchill (8%)

Code review

54 tests

User reviews

1 review

Install metrics

8,000+ active / 99,522 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.33MB] [CPU: ▼301.98ms] Passed 4 tests

An overview of server-side resources used by CPO Content Types
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4252.91 ▲3.27
Dashboard /wp-admin3.76 ▲0.3535.09 ▲2.72
Posts /wp-admin/edit.php4.01 ▲0.3742.31 ▲4.21
Add New Post /wp-admin/post-new.php7.23 ▲0.26101.76 ▼1,212.50
Media Library /wp-admin/upload.php3.64 ▲0.3425.86 ▼1.40
CPO Content Types /wp-admin/options-general.php?page=ctct_settings3.6125.42

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for CPO Content Types
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,770 ▲1615.91 ▼0.075.42 ▼1.012.28 ▼0.11
Dashboard /wp-admin2,899 ▲386.15 ▼0.07120.62 ▼16.22156.03 ▼7.40
Posts /wp-admin/edit.php2,692 ▲13.23 ▲0.0065.27 ▲0.45145.92 ▲1.41
Add New Post /wp-admin/post-new.php1,666 ▲515.66 ▼0.33415.85 ▲14.16158.39 ▼0.23
Media Library /wp-admin/upload.php1,705 ▲105.52 ▼0.02145.63 ▼7.74185.98 ▼13.38
CPO Content Types /wp-admin/options-general.php?page=ctct_settings1,1482.3755.66126.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cpo-content-types/includes/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cpo-content-types/cposts/cpost_services.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cpo-content-types/cposts/cpost_team.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cpo-content-types/cposts/cpost_testimonials.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cpo-content-types/cposts/cpost_features.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cpo-content-types/cposts/cpost_products.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cpo-content-types/cposts/cpost_portfolio.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cpo-content-types/cposts/cpost_clients.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cpo-content-types/cposts/cpost_slides.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cpo-content-types/cpo-content-types.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: team, features, team members, portfolio, services...

cpo-content-types/cpo-content-types.php Passed 13 tests

The main PHP file in "CPO Content Types" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
74 characters long description:
Adds support for a number of content types in your Wordpress installation.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,200 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP1111592796
PO File16651,455400
CSS1004

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
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%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
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
No PNG files were detected