83% social-shadow

Code Review | Social Shadow

WordPress plugin Social Shadow scored83%from 54 tests.

About plugin

  • Plugin page: social-shadow
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 6, 2016
  • Latest release: Aug 7, 2016
  • Number of updates: 20
  • Update frequency: every 0.1 days
  • Top authors: compemperor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /586 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.95ms] Passed 4 tests

An overview of server-side resources used by Social Shadow
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.57 ▲1.26
Dashboard /wp-admin3.32 ▼0.0342.63 ▼18.11
Posts /wp-admin/edit.php3.37 ▲0.0142.98 ▼4.41
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.85 ▼10.54
Media Library /wp-admin/upload.php3.24 ▲0.0136.38 ▲3.64

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 8 new options
New WordPress options
socshw_opts
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
error_msg

Browser metrics Passed 4 tests

Checking browser requirements for Social Shadow
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲4713.26 ▼1.491.74 ▼0.0544.67 ▲3.05
Dashboard /wp-admin2,222 ▲365.83 ▲0.95102.21 ▼4.9539.20 ▼3.68
Posts /wp-admin/edit.php2,105 ▲372.01 ▲0.0134.58 ▼2.1034.80 ▲1.46
Add New Post /wp-admin/post-new.php1,555 ▲3118.21 ▼5.14618.04 ▼49.0151.99 ▼2.81
Media Library /wp-admin/upload.php1,407 ▲194.19 ▲0.0299.80 ▼8.3345.61 ▼1.44

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • socshw_opts
    • error_msg
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/social-shadow/fg.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 23 tag instead of maximum 10
You can take inspiration from this readme.txt

social-shadow/fg.php 85% from 13 tests

The entry point to "Social Shadow" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("social-shadow.php" instead of "fg.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin7,844 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS38565,2495,059
JavaScript2381,7272,220
PHP1027491488
PO File1294277

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected