62% contentstream

Code Review | ContentStream

WordPress plugin ContentStream scored 62% from 54 tests.

About plugin

  • Plugin page: contentstream
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.7-4.9.8
  • WordPress version: 6.3.1
  • First release: Jan 2, 2019
  • Latest release: Jan 2, 2019
  • Number of updates: 5
  • Update frequency: every 2.4 days
  • Top authors: cfetechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 568 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.57MB] [CPU: ▲4.31ms] Passed 4 tests

A check of server-side resources used by ContentStream
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.21 ▲0.7552.76 ▲11.48
Dashboard /wp-admin3.86 ▲0.5563.41 ▲15.04
Posts /wp-admin/edit.php3.97 ▲0.6154.72 ▲6.29
Add New Post /wp-admin/post-new.php6.44 ▲0.5595.01 ▼10.72
Media Library /wp-admin/upload.php3.78 ▲0.5545.46 ▲10.19
Articles /wp-admin/admin.php?page=cs_article_listing3.8443.84
Settings /wp-admin/admin.php?page=cs_ar_settings3.7240.08

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: 5 new tables, 6 new options
New tables
wp_cs_ar_feed_info
wp_cs_ar_article_info
wp_cs_ar_log
wp_cs_ar_article_attachment_info
wp_cs_ar_config
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for ContentStream
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲8914.40 ▼0.211.85 ▲0.2643.02 ▼0.07
Dashboard /wp-admin2,219 ▲285.83 ▲0.9396.08 ▼8.3961.00 ▲11.48
Posts /wp-admin/edit.php2,111 ▲222.03 ▲0.0335.06 ▼1.3034.14 ▼2.12
Add New Post /wp-admin/post-new.php1,543 ▲2418.51 ▼4.83649.57 ▼68.1168.42 ▲10.84
Media Library /wp-admin/upload.php1,413 ▲254.17 ▼0.0891.70 ▼6.0877.74 ▲31.35
Articles /wp-admin/admin.php?page=cs_article_listing1,0032.0423.8128.69
Settings /wp-admin/admin.php?page=cs_ar_settings1,2011.7624.5827.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_cs_ar_article_info
    • wp_cs_ar_article_attachment_info
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=cs_article_listing
    • > Notice in wp-content/plugins/contentstream/app/templates/cs-ar-article-listing-view.php+36
    Undefined index: m
    • > GET request to /wp-admin/admin.php?page=cs_article_listing
    • > User deprecated in wp-includes/functions.php+5453
    Function get_author_name is deprecated since version 2.8.0! Use get_the_author_meta('display_name') instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cs_ar_settings
    • > Notice in wp-content/plugins/contentstream/app/classes/helpers/class-cs-ar-encryptor.php+79
    Undefined offset: 1
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cs_ar_settings
    • > Notice in wp-content/plugins/contentstream/app/classes/helpers/class-cs-ar-encryptor.php+79
    Undefined offset: 2

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/contentstream/app/templates/cs-ar-pagination.php
  • 18× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'csARCrudController' not found in wp-content/plugins/contentstream/app/classes/db/class-cs-ar-log-table-controller.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/contentstream/app/templates/cs-ar-admin-notice.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'csARRestRequest' not found in wp-content/plugins/contentstream/app/classes/rest/class-cs-ar-get-article-request.php:9
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/contentstream/app/templates/cs-ar-settings-form.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'csARCrudController' not found in wp-content/plugins/contentstream/app/classes/db/class-cs-ar-config-table-controller.php:8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/contentstream/app/templates/cs-ar-settings-form.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/contentstream/app/templates/cs-ar-single-article.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'csARCrudController' not found in wp-content/plugins/contentstream/app/classes/db/class-cs-ar-article-attachment-info-table-controller.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'csARRestRequest' not found in wp-content/plugins/contentstream/app/classes/rest/class-cs-ar-remove-from-queue-request.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'csARRestRequest' not found in wp-content/plugins/contentstream/app/classes/rest/class-cs-ar-enabled-feeds-request.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: automated content retrieval, custom post type, php, cron, contentstream...

contentstream/contentstream-article-retriever.php 92% from 13 tests

The primary PHP file in "ContentStream" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("contentstream.php" instead of "contentstream-article-retriever.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected3,194 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP344592,0472,979
CSS2460206
JavaScript1009

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity11.54
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods283
▷ Static methods00.00%
▷ Public methods283100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
app/images/cs-ar-menu-icon.png0.56KB0.77KB0.00%