62% page-in-page

Code Review | Page In Page

WordPress plugin Page In Page scored62%from 54 tests.

About plugin

  • Plugin page: page-in-page
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Nov 11, 2013
  • Latest release: Feb 24, 2014
  • Number of updates: 40
  • Update frequency: every 2.6 days
  • Top authors: tcyr (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /6,930 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.08ms] Passed 4 tests

Analyzing server-side resources used by Page In Page
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.84 ▼1.34
Dashboard /wp-admin3.33 ▼0.0244.61 ▼17.53
Posts /wp-admin/edit.php3.44 ▲0.0945.22 ▼1.15
Add New Post /wp-admin/post-new.php5.91 ▲0.0278.15 ▼18.50
Media Library /wp-admin/upload.php3.25 ▲0.0231.33 ▼2.93
Page-In-Page Plugin /wp-admin/options-general.php?page=wp-pip-admin-settings3.2729.82

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 31 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
_twl_pip_facebook-settings
_twl_pip_twitter-settings
db_upgraded
can_compress_scripts
widget_recent-posts
_twl_pip_cache_feeds
widget_twl_page_in_page_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Page In Page
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲12013.87 ▼0.504.95 ▲2.9542.21 ▼2.95
Dashboard /wp-admin2,214 ▲234.85 ▼0.0499.96 ▼6.4738.65 ▼7.52
Posts /wp-admin/edit.php2,094 ▲52.06 ▲0.0139.58 ▲4.7135.43 ▲1.80
Add New Post /wp-admin/post-new.php1,521 ▼1423.09 ▼0.08677.41 ▼1.0360.93 ▲7.18
Media Library /wp-admin/upload.php1,396 ▲114.20 ▲0.0098.40 ▼3.4945.09 ▼1.17
Page-In-Page Plugin /wp-admin/options-general.php?page=wp-pip-admin-settings1,0522.0724.1773.54

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 10 options
    • db_upgraded
    • widget_twl_page_in_page_widget
    • _twl_pip_twitter-settings
    • widget_recent-posts
    • _twl_pip_facebook-settings
    • theysaidso_admin_options
    • widget_recent-comments
    • _twl_pip_cache_feeds
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wp-pip-admin-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=wp-pip-admin-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% 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
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/page-in-page/inc/templates/twitter-feed-item.php
    • > /wp-content/plugins/page-in-page/inc/templates/fb-feed-container.php
    • > /wp-content/plugins/page-in-page/inc/templates/twitter-feed-container.php
    • > /wp-content/plugins/page-in-page/inc/templates/fb-feed-item.php
  • 37× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: item_link_link in wp-content/plugins/page-in-page/inc/templates/fb-feed-item.php on line 19
    • > PHP Notice
      Undefined variable: item_status_link in wp-content/plugins/page-in-page/inc/templates/twitter-feed-item.php on line 30
    • > PHP Notice
      Undefined variable: item_short_date in wp-content/plugins/page-in-page/inc/templates/twitter-feed-item.php on line 13
    • > PHP Notice
      Undefined variable: item_fb_link in wp-content/plugins/page-in-page/inc/templates/fb-feed-item.php on line 36
    • > PHP Notice
      Undefined variable: item_name in wp-content/plugins/page-in-page/inc/templates/twitter-feed-item.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/page-in-page/inc/templates/admin-settings.php:1
    • > PHP Warning
      Use of undefined constant TWL_PIP_CLASSPATH - assumed 'TWL_PIP_CLASSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-in-page/classes/classes.php on line 8
    • > PHP Notice
      Undefined variable: twitter_logo in wp-content/plugins/page-in-page/inc/templates/twitter-feed-item.php on line 30
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/page-in-page/classes/widgets.php:19
    • > PHP Notice
      Undefined variable: item_page_link in wp-content/plugins/page-in-page/inc/templates/fb-feed-item.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: widget, insert post in page, twitter feeds, page, facebook posts...

page-in-page/page-in-page.php 92% from 13 tests

The main PHP file in "Page In Page" ver. 2.0.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 279 characters long)

Code Analysis 5% from 3 tests

File types 0% from 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
It is important to fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/page-in-page/sdk/fb/fb_ca_chain_bundle.crt
2,759 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP214731,0192,482
CSS1539277
JavaScript1040

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity30.91
▷ Minimum class complexity1.00
▷ Maximum class complexity121.00
Average method complexity3.46
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes00.00%
Methods138
▷ Static methods3122.46%
▷ Public methods6547.10%
▷ Protected methods5842.03%
▷ Private methods1510.87%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants866.67%
▷ Class constants433.33%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png17.02KB9.34KB▼ 45.12%
assets/screenshot-1.png25.76KB10.81KB▼ 58.02%
inc/twitter_logo.png1.09KB1.22KB0.00%