77% carta-online

Code Review | Carta Online

WordPress plugin Carta Online scored77%from 54 tests.

About plugin

  • Plugin page: carta-online
  • Plugin version: 2.9.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.3
  • WordPress version: 6.3.1
  • First release: Jun 21, 2016
  • Latest release: Aug 15, 2023
  • Number of updates: 111
  • Update frequency: every 23.5 days
  • Top authors: cartaonline (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,376 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.66MB] [CPU: ▲3.20ms] Passed 4 tests

Analyzing server-side resources used by Carta Online
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.13 ▲0.6645.07 ▲1.80
Dashboard /wp-admin3.97 ▲0.6648.98 ▼1.77
Posts /wp-admin/edit.php4.02 ▲0.6654.95 ▲5.12
Add New Post /wp-admin/post-new.php6.55 ▲0.66100.52 ▲7.65
Media Library /wp-admin/upload.php3.89 ▲0.6642.17 ▲7.76

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_co_widget
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Carta Online
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲18713.56 ▼0.619.25 ▲7.4538.39 ▼10.98
Dashboard /wp-admin2,220 ▲295.86 ▲0.97103.55 ▼5.5272.66 ▲28.78
Posts /wp-admin/edit.php2,100 ▲112.01 ▼0.0341.31 ▼0.1036.94 ▲1.58
Add New Post /wp-admin/post-new.php1,533 ▲1418.34 ▼4.82686.88 ▲11.3367.66 ▲16.06
Media Library /wp-admin/upload.php1,393 ▲24.23 ▲0.01103.62 ▲6.2372.02 ▲28.45

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_co_widget
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% 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 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/carta-online/includes/co_datatable.php
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/carta-online/carta-online.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/carta-online/includes/co_shortcode_filter.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/carta-online/includes/co_api.php:383
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/carta-online/includes/co_shortcode_offer.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/carta-online/includes/co_shortcode_expertiselist.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/carta-online/includes/co_shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/carta-online/includes/co_shortcode_test.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/carta-online/includes/co_shortcode_teacher.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/carta-online/includes/co_widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/carta-online/includes/co_shortcode_companylist.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: Please a description for screenshot #2 in carta-online/assets to your readme.txt
You can look at the official readme.txt

carta-online/carta-online.php 85% from 13 tests

The principal PHP file in "Carta Online" v. 2.9.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 217 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin3,996 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP195394023,513
PO File1149175356
CSS2111687
JavaScript11340

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity28.75
▷ Minimum class complexity1.00
▷ Maximum class complexity90.00
Average method complexity4.70
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods90
▷ Static methods00.00%
▷ Public methods7280.00%
▷ Protected methods1516.67%
▷ Private methods33.33%
Functions109
▷ Named functions109100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png4.64KB2.13KB▼ 53.99%
images/admin_menu_icon.png0.80KB0.55KB▼ 32.04%