68% contentside-semantic-platform

Code Review | Contentside Semantic Platform

WordPress plugin Contentside Semantic Platform scored68%from 54 tests.

About plugin

  • Plugin page: contentside-seman...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.1-6.2
  • WordPress version: 6.3.1
  • First release: Sep 13, 2023
  • Latest release: Oct 13, 2023
  • Number of updates: 6
  • Update frequency: every 5.7 days
  • Top authors: contentside (83.33%)thibaultschaeller (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /91 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲1.51MB] [CPU: ▲13.79ms] Passed 4 tests

An overview of server-side resources used by Contentside Semantic Platform
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.97 ▲1.5157.66 ▲21.16
Dashboard /wp-admin4.82 ▲1.5159.94 ▲11.44
Posts /wp-admin/edit.php4.86 ▲1.5065.06 ▲13.34
Add New Post /wp-admin/post-new.php7.41 ▲1.52106.65 ▲9.20
Media Library /wp-admin/upload.php4.75 ▲1.5259.93 ▲26.90
CSP /wp-admin/tools.php?page=csp-plugin4.7145.95
Scheduled Actions /wp-admin/tools.php?page=action-scheduler4.9054.40

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 191 new files
Database: 4 new tables, 9 new options
New tables
wp_actionscheduler_groups
wp_actionscheduler_logs
wp_actionscheduler_claims
wp_actionscheduler_actions
New WordPress options
action_scheduler_hybrid_store_demarkation
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
schema-ActionScheduler_LoggerSchema
schema-ActionScheduler_StoreSchema
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contentside Semantic Platform
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,989 ▲22820.20 ▲5.645.98 ▲4.2844.07 ▲1.80
Dashboard /wp-admin2,281 ▲1079.56 ▲3.91221.78 ▲132.6040.13 ▼0.32
Posts /wp-admin/edit.php2,218 ▲1159.23 ▲7.2185.29 ▲44.1635.64 ▼0.01
Add New Post /wp-admin/post-new.php1,548 ▲2222.16 ▼0.75553.42 ▼121.6638.08 ▼20.18
Media Library /wp-admin/upload.php1,512 ▲10911.23 ▲7.06141.59 ▲41.1147.22 ▲3.57
CSP /wp-admin/tools.php?page=csp-plugin9398.7663.6125.80
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,3659.0668.2128.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie tables were found after uninstall: 4 tables
    • wp_actionscheduler_logs
    • wp_actionscheduler_claims
    • wp_actionscheduler_actions
    • wp_actionscheduler_groups
  • This plugin does not fully uninstall, leaving 9 options in the database
    • schema-ActionScheduler_StoreSchema
    • widget_recent-comments
    • theysaidso_admin_options
    • schema-ActionScheduler_LoggerSchema
    • action_scheduler_hybrid_store_demarkation
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/tools.php?page=csp-plugin
    • > Notice in wp-content/plugins/contentside-semantic-platform/src/admin/partials/csp-plugin-admin-display.php+80
    Undefined index: csp_plugin_posts_already_sync_count

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
The following issues need your attention
  • 47× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CspPluginCSPService' not found in wp-content/plugins/contentside-semantic-platform/src/common/CSP/CspPluginMoreLikeThisService.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Store_Deprecated' not found in wp-content/plugins/contentside-semantic-platform/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Store.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Store' not found in wp-content/plugins/contentside-semantic-platform/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/contentside-semantic-platform/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php:8
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/contentside-semantic-platform/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Schedule_Deprecated' not found in wp-content/plugins/contentside-semantic-platform/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schedule.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'ActionScheduler_Exception' not found in wp-content/plugins/contentside-semantic-platform/vendor/woocommerce/action-scheduler/classes/ActionScheduler_InvalidActionException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_Schedule' not found in wp-content/plugins/contentside-semantic-platform/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_RecurringSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/contentside-semantic-platform/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_HoursField.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Logger' not found in wp-content/plugins/contentside-semantic-platform/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: api, contentside, related posts, contentside semantic platform, ai...

contentside-semantic-platform/csp-plugin.php 85% from 13 tests

This is the main PHP file of "Contentside Semantic Platform" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("contentside-semantic-platform.php" instead of "csp-plugin.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
No dangerous file extensions were detected11,843 lines of code in 174 files:
LanguageFilesBlank linesComment linesLines of code
PHP1382,3417,1329,484
JavaScript262441201,868
JSON400180
Markdown3430113
CSS2244110
PO File1371688

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.74
▷ Minimum class complexity1.00
▷ Maximum class complexity97.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces5
Interfaces3
Traits0
Classes105
▷ Abstract classes1514.29%
▷ Concrete classes9085.71%
▷ Final classes00.00%
Methods805
▷ Static methods9011.18%
▷ Public methods60975.65%
▷ Protected methods14217.64%
▷ Private methods546.71%
Functions62
▷ Named functions2235.48%
▷ Anonymous functions4064.52%
Constants75
▷ Global constants11.33%
▷ Class constants7498.67%
▷ Public constants74100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
docs/select_text.png59.08KB22.03KB▼ 62.72%