78% foosocial

Code Review | Foosocial

WordPress plugin Foosocial scored78%from 54 tests.

About plugin

  • Plugin page: foosocial
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.3.1
  • WordPress version: 6.3.1
  • First release: Dec 4, 2015
  • Latest release: Dec 4, 2015
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: WPManiax (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /842 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼3.00ms] Passed 4 tests

This is a short check of server-side resources used by Foosocial
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1547.16 ▲3.90
Dashboard /wp-admin3.46 ▲0.1652.84 ▲0.42
Posts /wp-admin/edit.php3.58 ▲0.2252.94 ▲1.40
Add New Post /wp-admin/post-new.php6.06 ▲0.1898.49 ▼17.72
Media Library /wp-admin/upload.php3.39 ▲0.1642.80 ▲5.31
Foosocial /wp-admin/options-general.php?page=foosocial-settings3.3635.73

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Foosocial
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,994 ▲24813.63 ▼0.6415.30 ▲13.5053.00 ▲6.03
Dashboard /wp-admin2,214 ▲265.86 ▼0.05107.22 ▲1.2340.31 ▲1.00
Posts /wp-admin/edit.php2,097 ▲82.06 ▲0.0739.33 ▼1.8834.61 ▼1.31
Add New Post /wp-admin/post-new.php1,521 ▼1623.05 ▲4.61678.47 ▲44.4051.94 ▼0.31
Media Library /wp-admin/upload.php1,396 ▲114.23 ▼0.05101.26 ▲0.0947.63 ▲3.12
Foosocial /wp-admin/options-general.php?page=foosocial-settings8841.9634.3629.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% 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 0% 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× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/foosocial/public/partials/foosocial-public-display.php
    • > /wp-content/plugins/foosocial/admin/partials/foosocial-admin-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/foosocial/admin/settings/settings.php:23

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

foosocial/foosocial.php Passed 13 tests

The primary PHP file in "Foosocial" version 1.0.1 is used by WordPress to initiate all plugin functionality
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,500 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP15302751724
SVG100640
CSS391196
JavaScript2105540

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.89
▷ Minimum class complexity1.00
▷ Maximum class complexity65.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods48
▷ Static methods36.25%
▷ Public methods4287.50%
▷ Protected methods00.00%
▷ Private methods612.50%
Functions7
▷ Named functions7100.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
No PNG files were detected