73% instagrate-to-wordpress

Code Review | Intagrate Lite

WordPress plugin Intagrate Lite scored73%from 54 tests.

About plugin

  • Plugin page: instagrate-to-wor...
  • Plugin version: 1.3.5
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 15, 2012
  • Latest release: Aug 11, 2023
  • Number of updates: 133
  • Update frequency: every 31.8 days
  • Top authors: polevaultweb (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

5,000+ active /134,019 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.07MB] [CPU: ▲0.46ms] Passed 4 tests

Analyzing server-side resources used by Intagrate Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0949.77 ▲10.77
Dashboard /wp-admin3.37 ▲0.0649.01 ▲3.10
Posts /wp-admin/edit.php3.48 ▲0.1247.83 ▼0.68
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.06 ▼3.96
Media Library /wp-admin/upload.php3.29 ▲0.0636.98 ▲3.38
Intagrate Lite /wp-admin/options-general.php?page=instagratetowordpress3.2734.91

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 15 new options
New WordPress options
itw_imagelink
itw_version
itw_imagefeat
widget_theysaidso_widget
itw_post_date
itw_postformat
widget_recent-comments
itw_poststatus
can_compress_scripts
itw_defaulttitle
...

Browser metrics Passed 4 tests

Intagrate Lite: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.40 ▲0.031.88 ▲0.0447.83 ▲9.15
Dashboard /wp-admin2,210 ▲224.79 ▼1.12114.34 ▲0.7444.80 ▼3.44
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0335.41 ▼4.5133.90 ▼6.40
Add New Post /wp-admin/post-new.php1,545 ▲318.68 ▲0.32625.09 ▲10.5259.94 ▲10.30
Media Library /wp-admin/upload.php1,392 ▲44.19 ▲0.02101.91 ▼8.3147.24 ▲3.98
Intagrate Lite /wp-admin/options-general.php?page=instagratetowordpress1,0224.8751.6269.13

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% 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 0% 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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/instagrate-to-wordpress/templates/images.php
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Polevaultweb\\IntagrateLite\\WPOAuth2\\AccessTokenInterface' not found in wp-content/plugins/instagrate-to-wordpress/lib/AbstractAccessToken.php:5
    • > PHP Warning
      Use of undefined constant ITW_RETURN_URI - assumed 'ITW_RETURN_URI' (this will throw an Error in a future version of PHP) in wp-content/plugins/instagrate-to-wordpress/templates/settings.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/instagrate-to-wordpress/templates/settings.php:20
    • > PHP Notice
      Trying to get property 'data' of non-object in wp-content/plugins/instagrate-to-wordpress/templates/images.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'Polevaultweb\\IntagrateLite\\WPOAuth2\\AbstractAccessToken' not found in wp-content/plugins/instagrate-to-wordpress/php/class-wpoauth-access-token.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Polevaultweb\\IG\\WP_OAuth2\\OAuth2_Client' not found in wp-content/plugins/instagrate-to-wordpress/php/oauth/instagram-cient.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'instagrate_to_wordpress' not found in wp-content/plugins/instagrate-to-wordpress/templates/pro-sidebar.php:15
    • > PHP Notice
      Undefined variable: feed in wp-content/plugins/instagrate-to-wordpress/templates/images.php on line 8
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/instagrate-to-wordpress/templates/images.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'Polevaultweb\\IntagrateLite\\WPOAuth2\\AbstractAccessToken' not found in wp-content/plugins/instagrate-to-wordpress/lib/AccessToken.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=instagratetowordpress
    • > Network (severe)
    chrome-error://chromewebdata/ - Failed to load resource: the server responded with a status of 400 ()
    • > GET request to /wp-admin/options-general.php?page=instagratetowordpress
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://www.instagram.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: instagram photos, instagram feed, instagram posts, instagram embed, instagram

instagrate-to-wordpress/instagrate-to-wordpress.php Passed 13 tests

The main file in "Intagrate Lite" v. 1.3.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
71 characters long description:
Plugin for automatic posting of Instagram images into a WordPress blog.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected4,986 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP198143794,733
CSS1554253

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity14.50
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
Methods111
▷ Static methods3531.53%
▷ Public methods9081.08%
▷ Protected methods2018.02%
▷ Private methods10.90%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants675.00%
▷ Class constants225.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.15MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/error.png0.54KB0.54KB▼ 0.54%
images/lock_unlock.png0.54KB0.59KB0.00%
images/connect.png0.74KB0.71KB▼ 3.85%
images/polevaultweb_logo.png11.61KB4.10KB▼ 64.68%
images/pro-banner.png129.75KB49.58KB▼ 61.78%