10% society6-widget

Code Review | Society6 Widget

WordPress plugin Society6 Widget scored10%from 54 tests.

About plugin

  • Plugin page: society6-widget
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.4.2
  • WordPress version: 6.3.1
  • First release: Jul 4, 2013
  • Latest release: Feb 27, 2016
  • Number of updates: 5
  • Update frequency: every 193.6 days
  • Top authors: DBHN (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,922 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Society6_banner::activate() should not be called statically

Server metrics [RAM: ▼1.70MB] [CPU: ▼50.36ms] Passed 4 tests

Server-side resources used by Society6 Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.178.63 ▼29.72
Dashboard /wp-admin2.30 ▼1.0011.34 ▼39.31
Posts /wp-admin/edit.php2.31 ▼1.0512.25 ▼38.63
Add New Post /wp-admin/post-new.php2.30 ▼3.5811.14 ▼93.76
Media Library /wp-admin/upload.php2.31 ▼0.9210.93 ▼20.45

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
society6_banner

Browser metrics Passed 4 tests

An overview of browser requirements for Society6 Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▼0.271.69 ▲0.1838.57 ▼6.11
Dashboard /wp-admin2,209 ▲215.85 ▼0.06105.11 ▼0.6442.95 ▼0.82
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0340.02 ▲4.5235.55 ▲2.42
Add New Post /wp-admin/post-new.php1,545 ▲923.27 ▲0.12616.17 ▼70.1350.76 ▼9.99
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0497.68 ▼5.8841.04 ▼6.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Society6_banner::register() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/society6-widget/dbhn-society6-widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: society6, store, promote, widget, banner

society6-widget/dbhn-society6-widget.php 92% from 13 tests

This is the main PHP file of "Society6 Widget" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("society6-widget.php" instead of "dbhn-society6-widget.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
Success! There were no dangerous files found in this plugin65 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1141165

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin