64% cpd-journals

Code Review | CPD-Journals

WordPress plugin CPD-Journals scored64%from 54 tests.

About plugin

  • Plugin page: cpd-journals
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.6
  • WordPress version: 6.3.1
  • First release: Aug 22, 2013
  • Latest release: Jun 10, 2014
  • Number of updates: 8
  • Update frequency: every 36.6 days
  • Top authors: saulcoz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,321 total downloads

Benchmarks

Plugin footprint 48% 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: ▼1.95MB] [CPU: ▼49.95ms] Passed 4 tests

A check of server-side resources used by CPD-Journals
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.424.19 ▼35.71
Dashboard /wp-admin2.06 ▼1.255.29 ▼41.34
Posts /wp-admin/edit.php2.06 ▼1.305.93 ▼42.23
Add New Post /wp-admin/post-new.php2.06 ▼3.835.82 ▼80.51
Media Library /wp-admin/upload.php2.06 ▼1.177.45 ▼28.96

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: 2 new tables, 6 new options
New tables
wp_cpd_posts
wp_cpd_relationships
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for CPD-Journals
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲17013.34 ▼1.041.79 ▼0.0838.95 ▼10.51
Dashboard /wp-admin2,303 ▲1184.92 ▼0.94110.75 ▲9.4143.92 ▲1.02
Posts /wp-admin/edit.php2,101 ▲122.03 ▲0.0339.40 ▲2.8836.36 ▲3.58
Add New Post /wp-admin/post-new.php1,538 ▲523.15 ▼0.18677.56 ▲5.0061.87 ▲15.83
Media Library /wp-admin/upload.php1,395 ▲74.29 ▲0.1098.74 ▲3.7043.63 ▼3.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the cpd_journal handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_cpd_posts
    • wp_cpd_relationships
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cpd-journals/cpd-journals.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: Plugin contributors field is missing
Please take inspiration from this readme.txt

cpd-journals/cpd-journals.php 92% from 13 tests

The entry point to "CPD-Journals" version 0.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 178 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin896 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP114087796
CSS14057
JavaScript10043

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity59.00
▷ Minimum class complexity59.00
▷ Maximum class complexity59.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods60
▷ Static methods00.00%
▷ Public methods60100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin