68% google-interactive-posts

Code Review | Google+ Interactive Posts

WordPress plugin Google+ Interactive Posts scored68%from 54 tests.

About plugin

  • Plugin page: google-interactiv...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 6.3.1
  • First release: Jan 14, 2014
  • Latest release: May 14, 2015
  • Number of updates: 28
  • Update frequency: every 17.4 days
  • Top authors: Dejan SEO (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,097 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.88MB] [CPU: ▼39.36ms] Passed 4 tests

An overview of server-side resources used by Google+ Interactive Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0333.36 ▼5.21
Dashboard /wp-admin3.07 ▼0.2425.10 ▼32.32
Posts /wp-admin/edit.php3.07 ▼0.2930.87 ▼23.68
Add New Post /wp-admin/post-new.php3.07 ▼2.8223.40 ▼83.42
Media Library /wp-admin/upload.php3.07 ▼0.1723.33 ▼18.00

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Google+ Interactive Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.12 ▼0.2343.42 ▲41.6044.33 ▲1.43
Dashboard /wp-admin2,223 ▲525.86 ▲0.3093.33 ▲1.0942.77 ▼2.62
Posts /wp-admin/edit.php2,129 ▲322.01 ▲0.0241.30 ▲3.1537.00 ▼1.15
Add New Post /wp-admin/post-new.php6,866 ▲5,34026.25 ▲3.18849.22 ▲199.5154.71 ▲4.62
Media Library /wp-admin/upload.php1,431 ▲374.21 ▲0.02100.35 ▲0.0146.70 ▲0.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% 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 0% 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 fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/google-interactive-posts/templates/header_tpl.php
    • > /wp-content/plugins/google-interactive-posts/templates/footer_tpl.php
    • > /wp-content/plugins/google-interactive-posts/templates/form.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/google-interactive-posts/index.php:12
    • > PHP Notice
      Undefined variable: api_key in wp-content/plugins/google-interactive-posts/templates/form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/google-interactive-posts/templates/api_instructions.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
9 plugin tags: sharing, google, interactive, share, shares...

google-interactive-posts/index.php 92% from 13 tests

The entry point to "Google+ Interactive Posts" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("google-interactive-posts.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected371 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP55340312
CSS27158
JavaScript10131

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.72
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.56MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/imgs/6_6.png139.14KB57.71KB▼ 58.52%
templates/imgs/1_1.png56.81KB23.01KB▼ 59.49%
style/btn_icons_sprite.png0.83KB1.37KB0.00%
templates/imgs/5_5.png100.15KB38.64KB▼ 61.41%
templates/imgs/2_2.png63.62KB26.57KB▼ 58.24%