84% metronet-embed-google-plus

Code Review | Metronet Embed Google Plus

WordPress plugin Metronet Embed Google Plus scored84%from 54 tests.

About plugin

  • Plugin page: metronet-embed-go...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1+
  • WordPress version: 6.3.1
  • First release: Sep 30, 2013
  • Latest release: Sep 30, 2013
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: ryanhellyer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,768 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
Installer ran successfully

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

A check of server-side resources used by Metronet Embed Google Plus
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.06 ▼6.67
Dashboard /wp-admin3.31 ▲0.0042.43 ▼8.78
Posts /wp-admin/edit.php3.36 ▲0.0047.28 ▲0.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.61 ▼10.82
Media Library /wp-admin/upload.php3.23 ▲0.0034.73 ▲0.63

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Metronet Embed Google Plus: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.361.74 ▼0.2341.61 ▼1.83
Dashboard /wp-admin2,203 ▲155.78 ▼0.04101.58 ▼16.8841.67 ▼4.15
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0138.72 ▲0.8434.56 ▲1.73
Add New Post /wp-admin/post-new.php1,547 ▲1418.31 ▼4.62622.25 ▼44.1865.43 ▲10.23
Media Library /wp-admin/upload.php1,382 ▼64.22 ▼0.0298.52 ▼10.9842.75 ▼2.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 add_shortcode() in wp-content/plugins/metronet-embed-google-plus/index.php:41

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (An example embedded Google+ post) image not found
You can look at the official readme.txt

metronet-embed-google-plus/index.php 92% from 13 tests

Analyzing the main PHP file in "Metronet Embed Google Plus" version 1.0.1
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("metronet-embed-google-plus.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin38 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1194638

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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
1 PNG file occupies 0.17MB with 0.11MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png176.02KB59.64KB▼ 66.12%