10% cj-custom-content

Code Review | CJ Custom Content

WordPress plugin CJ Custom Content scored10%from 54 tests.

About plugin

  • Plugin page: cj-custom-content
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.3
  • WordPress version: 6.3.1
  • First release: Feb 4, 2012
  • Latest release: Feb 18, 2012
  • Number of updates: 19
  • Update frequency: every 0.8 days
  • Top authors: shibulijack (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,756 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/cj-custom-content/cj-custom-content.php+40
    Methods with the same name as their class will not be constructors in a future version of PHP; cjPluginSeriesContent has a deprecated constructor

Server metrics [RAM: ▼1.88MB] [CPU: ▼60.61ms] Passed 4 tests

An overview of server-side resources used by CJ Custom Content
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.355.35 ▼46.06
Dashboard /wp-admin2.13 ▼1.215.73 ▼60.85
Posts /wp-admin/edit.php2.13 ▼1.226.32 ▼43.87
Add New Post /wp-admin/post-new.php2.13 ▼3.755.72 ▼91.66
Media Library /wp-admin/upload.php2.13 ▼1.106.44 ▼31.10

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for CJ Custom Content
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.67 ▲0.451.77 ▲0.0643.83 ▲1.36
Dashboard /wp-admin2,202 ▲225.66 ▲0.0186.98 ▼1.2237.68 ▼2.69
Posts /wp-admin/edit.php2,107 ▲71.99 ▲0.0535.45 ▼0.8632.59 ▼8.03
Add New Post /wp-admin/post-new.php1,529 ▲322.97 ▼0.73664.78 ▼3.2949.63 ▼1.88
Media Library /wp-admin/upload.php1,404 ▲44.19 ▲0.0195.82 ▼11.5247.00 ▼0.47
CJ Custom Content /wp-admin/cj-custom-content.php260.420.1316.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/cj-custom-content/cj-custom-content.php+40
    Methods with the same name as their class will not be constructors in a future version of PHP; cjPluginSeriesContent has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cj-custom-content/cj-custom-content.php:228

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/cj-custom-content.php
    • > Network (severe)
    wp-admin/cj-custom-content.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png), #4 (screenshot-4.png)
The official readme.txt is a good inspiration

cj-custom-content/cj-custom-content.php 92% from 13 tests

"CJ Custom Content" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 423 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin199 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11423199

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin