83% civic-social-feeds

Code Review | Civic Social Feeds

WordPress plugin Civic Social Feeds scored83%from 54 tests.

About plugin

  • Plugin page: civic-social-feeds
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7
  • WordPress version: 6.3.1
  • First release: Apr 24, 2019
  • Latest release: Mar 11, 2021
  • Number of updates: 13
  • Update frequency: every 53.0 days
  • Top authors: glympe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,169 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.55MB] [CPU: ▼13.88ms] Passed 4 tests

A check of server-side resources used by Civic Social Feeds
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1343.72 ▼3.29
Dashboard /wp-admin3.43 ▲0.1347.82 ▼2.69
Posts /wp-admin/edit.php3.55 ▲0.1947.45 ▼0.06
Add New Post /wp-admin/post-new.php3.31 ▼2.5842.74 ▼49.47
Media Library /wp-admin/upload.php3.36 ▲0.1336.09 ▲0.11

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Civic Social Feeds
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.30 ▼1.111.81 ▼0.4143.81 ▼1.33
Dashboard /wp-admin2,241 ▲414.87 ▼0.02103.31 ▼16.3742.74 ▼3.33
Posts /wp-admin/edit.php2,123 ▲262.02 ▼0.0336.47 ▼1.6931.57 ▼5.66
Add New Post /wp-admin/post-new.php1,555 ▲1018.10 ▼5.28614.44 ▼55.4347.43 ▼12.43
Media Library /wp-admin/upload.php1,426 ▲264.30 ▲0.14104.11 ▼11.6546.72 ▼0.89

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/civic-social-feeds/admin/partials/csf-admin-display.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: social feeds, facebook, twitter, instagram, feeds

civic-social-feeds/csf.php 77% from 13 tests

The principal PHP file in "Civic Social Feeds" v. 1.1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("civic-social-feeds.php" instead of "csf.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,323 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP15253522950
CSS2584313
JavaScript19660

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.32
Average class complexity6.64
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods53
▷ Static methods23.77%
▷ Public methods4177.36%
▷ Protected methods00.00%
▷ Private methods1222.64%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants116.67%
▷ Class constants583.33%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.22MB with 0.15MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png223.16KB73.12KB▼ 67.23%