84% chatplusjp

Code Review | CHATPLUSJP

WordPress plugin CHATPLUSJP scored 84% from 54 tests.

About plugin

  • Plugin page: chatplusjp
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.1-4.7.7
  • WordPress version: 5.8.1
  • First release: Nov 16, 2017
  • Latest release: Apr 27, 2018
  • Number of updates: 15
  • Update frequency: every 11.2 days
  • Top authors: chatplusjp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 671 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.15MB] [CPU: ▼154.12ms] Passed 4 tests

Analyzing server-side resources used by CHATPLUSJP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0147.89 ▲14.05
Dashboard /wp-admin2.99 ▼0.0730.30 ▼13.97
Posts /wp-admin/edit.php3.04 ▼0.0730.85 ▼20.07
Add New Post /wp-admin/post-new.php4.99 ▼0.4474.20 ▼579.81
Media Library /wp-admin/upload.php2.99 ▼0.0129.94 ▼2.64

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 1 new option
New WordPress options
cpj_system_setting

Browser metrics Passed 4 tests

Checking browser requirements for CHATPLUSJP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,917 ▲32117.13 ▲1.5419.38 ▲8.5850.06 ▲2.61
Dashboard /wp-admin2,981 ▲505.91 ▼0.01169.84 ▲14.03121.79 ▲15.77
Posts /wp-admin/edit.php2,754 ▲152.72 ▲0.0068.89 ▼8.0985.00 ▼1.62
Add New Post /wp-admin/post-new.php1,693 ▲1018.73 ▼0.01377.80 ▼29.24106.08 ▼1.63
Media Library /wp-admin/upload.php1,822 ▲155.03 ▲0.01151.38 ▲0.98114.84 ▲0.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • cpj_system_setting

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/chatplusjp/chatplusjp.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/chatplusjp/chatplusjp.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/chatplusjp/admin/views/system-setting.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CHATPLUSJP_Admin_Page' not found in wp-content/plugins/chatplusjp/admin/class-admin-setting.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: chat, chatplus

chatplusjp/chatplusjp.php Passed 13 tests

The principal PHP file in "CHATPLUSJP" v. 1.0.2 is loaded by WordPress automatically on each request
35 characters long description:
This plugin add chatplus your page.

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
Success! There were no dangerous files found in this plugin460 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8132183445
CSS23015

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.40
▷ Minimum class complexity2.00
▷ Maximum class complexity29.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods47
▷ Static methods1021.28%
▷ Public methods4085.11%
▷ Protected methods12.13%
▷ Private methods612.77%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin