74% simple-social-media

Code Review | Simple Social Media

WordPress plugin Simple Social Media scored74%from 54 tests.

About plugin

  • Plugin page: simple-social-media
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4.1
  • WordPress version: 6.3.1
  • First release: Mar 16, 2016
  • Latest release: May 18, 2016
  • Number of updates: 7
  • Update frequency: every 9.1 days
  • Top authors: newscope (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,774 total downloads

Benchmarks

Plugin footprint 65% 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.91MB] [CPU: ▼32.10ms] Passed 4 tests

Analyzing server-side resources used by Simple Social Media
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.62 ▼5.37
Dashboard /wp-admin3.04 ▼0.2723.58 ▼25.58
Posts /wp-admin/edit.php3.04 ▼0.3225.27 ▼24.78
Add New Post /wp-admin/post-new.php3.04 ▼2.8526.73 ▼65.63
Media Library /wp-admin/upload.php3.04 ▼0.1922.07 ▼12.40

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Simple Social Media
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲10213.41 ▼1.371.72 ▼0.1140.98 ▼2.48
Dashboard /wp-admin2,243 ▲524.98 ▲0.09103.25 ▲3.7540.84 ▲0.91
Posts /wp-admin/edit.php2,128 ▲422.28 ▲0.3040.87 ▲4.6835.63 ▼2.98
Add New Post /wp-admin/post-new.php1,543 ▲2923.53 ▲5.98635.26 ▼135.4635.12 ▼26.16
Media Library /wp-admin/upload.php1,425 ▲434.45 ▲0.24101.13 ▲4.6540.45 ▼3.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-social-media/social_media_plugin.php:17

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === simple-social-media === )
You can look at the official readme.txt

simple-social-media/social_media_plugin.php 92% from 13 tests

Analyzing the main PHP file in "Simple Social Media" version 1.1
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-social-media.php" instead of "social_media_plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin561 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP16919308
SVG14014230
CSS15118
JavaScript1005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin