83% cactus-social-feeds

Code Review | Social Feeds

WordPress plugin Social Feeds scored83%from 54 tests.

About plugin

  • Plugin page: cactus-social-feeds
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9
  • WordPress version: 6.3.1
  • First release: May 17, 2018
  • Latest release: May 28, 2018
  • Number of updates: 12
  • Update frequency: every 1.0 days
  • Top authors: cactusthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,685 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.35ms] Passed 4 tests

Analyzing server-side resources used by Social Feeds
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0940.03 ▼0.82
Dashboard /wp-admin3.39 ▲0.0948.03 ▲1.89
Posts /wp-admin/edit.php3.44 ▲0.0843.20 ▼7.22
Add New Post /wp-admin/post-new.php5.97 ▲0.0879.12 ▼20.95
Media Library /wp-admin/upload.php3.31 ▲0.0835.17 ▼0.39

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_ct_social_feed
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Social Feeds: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6214.78 ▲0.151.69 ▼0.1244.27 ▼2.84
Dashboard /wp-admin2,208 ▲204.83 ▼0.0296.72 ▼8.3338.60 ▼8.31
Posts /wp-admin/edit.php2,088 ▼11.98 ▼0.0233.82 ▼2.2734.73 ▲0.28
Add New Post /wp-admin/post-new.php1,525 ▼818.23 ▼4.94608.97 ▲2.9950.99 ▲0.59
Media Library /wp-admin/upload.php1,390 ▲24.23 ▲0.0595.69 ▼8.5441.79 ▼1.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_ct_social_feed
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cactus-social-feeds/admin/html/twitter_widget_fields.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cactus-social-feeds/cactus-social-feed.php:10

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 on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4 in cactus-social-feeds/assets to your readme.txt
You can look at the official readme.txt

cactus-social-feeds/cactus-social-feed.php 92% from 13 tests

Analyzing the main PHP file in "Social Feeds" version 1.0.2
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cactus-social-feeds.php" instead of "cactus-social-feed.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
No dangerous file extensions were detected4,355 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
SVG30122,880
PHP4327391,097
CSS345378

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.69
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes215.38%
▷ Concrete classes1184.62%
▷ Final classes00.00%
Methods83
▷ Static methods1012.05%
▷ Public methods7286.75%
▷ Protected methods22.41%
▷ Private methods910.84%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ 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
No PNG images were found in this plugin