78% cart66-cloud-members

Code Review | Cart66 Cloud Members

WordPress plugin Cart66 Cloud Members scored78%from 54 tests.

About plugin

  • Plugin page: cart66-cloud-members
  • Plugin version: 1.1.7
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Jul 17, 2015
  • Latest release: Aug 19, 2019
  • Number of updates: 25
  • Update frequency: every 59.8 days
  • Top authors: reality66 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,569 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.39ms] Passed 4 tests

An overview of server-side resources used by Cart66 Cloud Members
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0442.96 ▲2.06
Dashboard /wp-admin3.35 ▲0.0048.76 ▼7.40
Posts /wp-admin/edit.php3.47 ▲0.1145.90 ▼2.92
Add New Post /wp-admin/post-new.php5.93 ▲0.0478.10 ▼10.34
Media Library /wp-admin/upload.php3.28 ▲0.0435.03 ▼0.91

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Cart66 Cloud Members: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.28 ▼1.122.24 ▲0.2545.34 ▼4.08
Dashboard /wp-admin2,215 ▲305.88 ▲1.00106.98 ▲2.5840.90 ▲2.60
Posts /wp-admin/edit.php2,095 ▲62.06 ▲0.0633.58 ▼8.6333.80 ▼3.13
Add New Post /wp-admin/post-new.php1,539 ▼223.29 ▲0.34686.46 ▲92.1757.98 ▼15.99
Media Library /wp-admin/upload.php1,394 ▲64.22 ▼0.0597.45 ▼2.6243.71 ▼2.15

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cart66-cloud-members/views/widget/html-account-sidebar.php
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: is_logged_in in wp-content/plugins/cart66-cloud-members/views/widget/html-account-sidebar-content.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'CC_Admin_Settings_Field' not found in wp-content/plugins/cart66-cloud-members/includes/admin/class-cm-admin-restriction-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cart66-cloud-members/views/widget/html-account-sidebar-content.php:33
    • > PHP Notice
      Undefined variable: after_title in wp-content/plugins/cart66-cloud-members/views/widget/html-account-sidebar.php on line 6
    • > PHP Notice
      Undefined variable: after_widget in wp-content/plugins/cart66-cloud-members/views/widget/html-account-sidebar.php on line 10
    • > PHP Notice
      Undefined variable: before_title in wp-content/plugins/cart66-cloud-members/views/widget/html-account-sidebar.php on line 4
    • > PHP Notice
      Undefined variable: widget in wp-content/plugins/cart66-cloud-members/views/widget/html-account-admin.php on line 2
    • > PHP Notice
      Undefined variable: logged_out_message in wp-content/plugins/cart66-cloud-members/views/widget/html-account-sidebar-content.php on line 29
    • > PHP Fatal error
      Uncaught Error: Class 'CC_Admin_Setting' not found in wp-content/plugins/cart66-cloud-members/includes/admin/class-cm-admin-settings-notifications.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cart66-cloud-members/includes/class-cm-account-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Create a tutorial where you have to be a member to see the video), #2 (The view if you do not have a membership and denied access to premium content), #3 (The view if you are logged in with a membership and can see the premium content), #4 (Page editor meta box for requiring a membership to view the page (or post))
Please take inspiration from this readme.txt

cart66-cloud-members/cart66-members.php 92% from 13 tests

The main PHP file in "Cart66 Cloud Members" ver. 1.1.7 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("cart66-cloud-members.php" instead of "cart66-members.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,816 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP253874141,632
JavaScript33213157
CSS37727

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity12.28
▷ Minimum class complexity1.00
▷ Maximum class complexity65.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods110
▷ Static methods4137.27%
▷ Public methods10191.82%
▷ Protected methods21.82%
▷ Private methods76.36%
Functions10
▷ Named functions440.00%
▷ Anonymous functions660.00%
Constants4
▷ Global constants4100.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
4 PNG files occupy 0.27MB with 0.18MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png55.52KB19.44KB▼ 64.99%
screenshot-4.png33.02KB13.40KB▼ 59.43%
screenshot-3.png93.87KB26.25KB▼ 72.03%
screenshot-1.png95.23KB35.48KB▼ 62.75%