84% sm-google-plus

Code Review | SM Google+ Plugins

WordPress plugin SM Google+ Plugins scored 84% from 54 tests.

About plugin

  • Plugin page: sm-google-plus
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.7
  • WordPress version: 5.8.1
  • First release: Aug 24, 2016
  • Latest release: Aug 24, 2016
  • Number of updates: 9
  • Update frequency: every 13.2 days
  • Top authors: mahabubs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,056 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼137.53ms] Passed 4 tests

This is a short check of server-side resources used by SM Google+ Plugins
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1533.84 ▲10.30
Dashboard /wp-admin3.09 ▲0.0345.43 ▼2.99
Posts /wp-admin/edit.php3.14 ▲0.0347.02 ▼1.75
Add New Post /wp-admin/post-new.php5.45 ▲0.02120.58 ▼540.86
Media Library /wp-admin/upload.php3.03 ▲0.0236.54 ▼4.50

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
widget_sm_google_plus_follow_button

Browser metrics Passed 4 tests

A check of browser resources used by SM Google+ Plugins
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.90 ▲0.349.63 ▼2.3650.67 ▲0.34
Dashboard /wp-admin2,967 ▲336.00 ▼0.10147.89 ▲1.66114.53 ▼1.30
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0168.82 ▼3.1687.80 ▼3.48
Add New Post /wp-admin/post-new.php1,581 ▲8318.17 ▼0.68441.32 ▲41.30122.87 ▲5.75
Media Library /wp-admin/upload.php1,807 ▼05.03 ▼0.01154.47 ▲4.14127.38 ▲1.83

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_sm_google_plus_follow_button

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sm-google-plus/sm-google-plus.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sm-google-plus/includes/sm_google_plus_follow_button.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: widget, google, plugin, google-plus

sm-google-plus/sm-google-plus.php 92% from 13 tests

"SM Google+ Plugins" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 258 characters long)

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
Good job! No executable or dangerous file extensions detected114 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22716114

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin