84% opes-wp-social-tabs

Code Review | Opes WP Social Tabs

WordPress plugin Opes WP Social Tabs scored84%from 54 tests.

About plugin

  • Plugin page: opes-wp-social-tabs
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.1.1
  • WordPress version: 6.3.1
  • First release: Mar 20, 2015
  • Latest release: Apr 10, 2015
  • Number of updates: 8
  • Update frequency: every 2.6 days
  • Top authors: twapaw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,289 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.13MB] [CPU: ▼2.26ms] Passed 4 tests

This is a short check of server-side resources used by Opes WP Social Tabs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1144.83 ▲4.41
Dashboard /wp-admin3.44 ▲0.1454.26 ▲1.11
Posts /wp-admin/edit.php3.55 ▲0.2048.07 ▼1.60
Add New Post /wp-admin/post-new.php6.02 ▲0.1394.87 ▼1.95
Media Library /wp-admin/upload.php3.36 ▲0.1437.90 ▼6.60

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Opes WP Social Tabs
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲9014.73 ▲0.732.03 ▲0.3643.63 ▼2.51
Dashboard /wp-admin2,217 ▲174.84 ▼0.97103.60 ▼3.4975.59 ▲30.96
Posts /wp-admin/edit.php2,108 ▲81.98 ▼0.0339.30 ▲1.6637.40 ▲0.79
Add New Post /wp-admin/post-new.php1,548 ▲323.10 ▼0.09755.88 ▲77.2068.47 ▲12.32
Media Library /wp-admin/upload.php1,411 ▲114.14 ▼0.11102.03 ▲2.9272.43 ▲26.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-posts
    • owpst_jdvu_options_main_settings
    • owpst_jdvu_options_social_links
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required '__OWPST_jdvu__THIS_PLUGIN__DIR_inc/common/common.class.php' (include_path='.:/usr/share/php') in wp-content/plugins/opes-wp-social-tabs/inc/main.class.php on line 3
    • > PHP Warning
      Use of undefined constant __OWPST_jdvu__THIS_PLUGIN__DIR_ - assumed '__OWPST_jdvu__THIS_PLUGIN__DIR_' (this will throw an Error in a future version of PHP) in wp-content/plugins/opes-wp-social-tabs/inc/main.class.php on line 3
    • > PHP Notice
      Undefined variable: params in wp-content/plugins/opes-wp-social-tabs/inc/front/controller/1-frontSocialTabs-ToLoad.php on line 117
    • > PHP Notice
      Trying to get property 'plugin_short_slug' of non-object in wp-content/plugins/opes-wp-social-tabs/inc/front/controller/1-frontSocialTabs-ToLoad.php on line 17
    • > PHP Warning
      require_once(__OWPST_jdvu__THIS_PLUGIN__DIR_inc/common/common.class.php): failed to open stream: No such file or directory in wp-content/plugins/opes-wp-social-tabs/inc/main.class.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/opes-wp-social-tabs/inc/common/controller/1-initData-ToLoad.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/opes-wp-social-tabs/opes-wp-social-tabs.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/opes-wp-social-tabs/inc/front/controller/1-frontSocialTabs-ToLoad.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/opes-wp-social-tabs/inc/admin/controller/4-adminOptionsPanel-ToLoad.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

opes-wp-social-tabs/opes-wp-social-tabs.php 92% from 13 tests

The main PHP file in "Opes WP Social Tabs" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin834 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP9210312791
CSS15022
JavaScript16021

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity23.88
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity6.08
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods36
▷ Static methods1438.89%
▷ Public methods2569.44%
▷ Protected methods00.00%
▷ Private methods1130.56%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.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
8 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/admin/assets/images/icon-20-red.png0.87KB0.93KB0.00%
inc/front/assets/images/fb-tab.png9.74KB4.51KB▼ 53.65%
inc/front/assets/images/yt-tab.png7.28KB3.45KB▼ 52.58%
inc/admin/assets/images/icon-20-pink.png0.96KB1.00KB0.00%
inc/admin/assets/images/checked_checkbox-40.png0.86KB0.86KB0.11%