84% cb-default-content

Code Review | CB Default Content

WordPress plugin CB Default Content scored84%from 54 tests.

About plugin

  • Plugin page: cb-default-content
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0
  • WordPress version: 6.3.1
  • First release: Oct 13, 2015
  • Latest release: Dec 12, 2018
  • Number of updates: 10
  • Update frequency: every 116.0 days
  • Top authors: hmbashar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /963 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.23ms] Passed 4 tests

This is a short check of server-side resources used by CB Default Content
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.54 ▼5.41
Dashboard /wp-admin3.32 ▲0.0247.87 ▼3.57
Posts /wp-admin/edit.php3.38 ▲0.0251.26 ▲2.32
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.22 ▼0.99
Media Library /wp-admin/upload.php3.25 ▲0.0235.80 ▼6.94
CB Default Content /wp-admin/options-general.php?page=cb_default_content3.2130.23

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

CB Default Content: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.08 ▼0.362.14 ▲0.3338.51 ▼9.13
Dashboard /wp-admin2,202 ▲225.67 ▲0.0297.62 ▼1.4043.82 ▲1.54
Posts /wp-admin/edit.php2,104 ▲71.99 ▼0.0239.19 ▲1.9335.48 ▲0.16
Add New Post /wp-admin/post-new.php1,531 ▲523.09 ▲0.12671.82 ▼9.9052.62 ▼11.33
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.0296.81 ▼16.8742.70 ▼7.00
CB Default Content /wp-admin/options-general.php?page=cb_default_content8102.1126.2941.21

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please fix the following items
  • 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/cb-default-content/index.php:27

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 96% from 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
4 plugin tags: sat default content, change default content, default content, change default title

cb-default-content/index.php 92% from 13 tests

Analyzing the main PHP file in "CB Default Content" version 1.0
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cb-default-content.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected41 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1381441

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
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 Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected