10% cp-author-online

Code Review | CP Author Online

WordPress plugin CP Author Online scored10%from 54 tests.

About plugin

  • Plugin page: cp-author-online
  • Plugin version: 1.8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 1, 2016
  • Latest release: Mar 19, 2019
  • Number of updates: 102
  • Update frequency: every 11.2 days
  • Top authors: easycpmods (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,606 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/cp-author-online/ecpm-cao.php+59
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼0.79MB] [CPU: ▼28.59ms] Passed 4 tests

An overview of server-side resources used by CP Author Online
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1644.67 ▲5.47
Dashboard /wp-admin3.15 ▼0.1526.91 ▼24.93
Posts /wp-admin/edit.php3.15 ▼0.2026.83 ▼22.83
Add New Post /wp-admin/post-new.php3.15 ▼2.7328.18 ▼58.17
Media Library /wp-admin/upload.php3.15 ▼0.0827.79 ▼8.42
CP Author Online /wp-admin/options-general.php?page=ecpm_cao_settings_page3.1527.71

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 71 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
ecpm_cao_settings
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for CP Author Online
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.26 ▼0.401.83 ▼0.2145.80 ▲0.13
Dashboard /wp-admin2,199 ▲195.55 ▼0.1488.06 ▼2.3439.95 ▼0.59
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0334.93 ▼1.8234.06 ▲1.67
Add New Post /wp-admin/post-new.php1,538 ▼1323.38 ▲0.39687.97 ▼35.8158.50 ▼13.40
Media Library /wp-admin/upload.php1,404 ▲44.26 ▲0.0897.40 ▼6.6245.88 ▼1.70
CP Author Online /wp-admin/options-general.php?page=ecpm_cao_settings_page1,6981.7027.7968.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/cp-author-online/ecpm-cao.php+65
    Use of undefined constant APP_TD - assumed 'APP_TD' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=ecpm_cao_settings_page
    • > Warning in wp-content/plugins/cp-author-online/ecpm-cao.php+65
    Use of undefined constant APP_TD - assumed 'APP_TD' (this will throw an Error in a future version of PHP)

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/cp-author-online/image_sidebar.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/cp-author-online/ecpm-cao.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Plugin's settings), #2 (How it looks on a live site), #3 (Hover over online user), #4 (Hover over offline user), #5 (User can decide to hide online status)
The official readme.txt is a good inspiration

cp-author-online/ecpm-cao.php 77% from 13 tests

"CP Author Online" version 1.8.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 224 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cp-author-online.php" instead of "ecpm-cao.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,399 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP311531689
CSS221335562
PO File15961148

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.37
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
41 compressed PNG files occupy 0.24MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/cao-icons-inv-20.png3.37KB2.55KB▼ 24.49%
images/easy-credit-payments.png3.13KB3.19KB0.00%
images/paid-ad-features.png2.66KB2.76KB0.00%
screenshot-1.png30.58KB16.55KB▼ 45.88%
images/cp-author-online.png2.37KB2.37KB0.00%