62% embed-iphoneipad-app

Code Review | Embed iPhone/iPad App

WordPress plugin Embed iPhone/iPad App scored62%from 54 tests.

About plugin

  • Plugin page: embed-iphoneipad-app
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-3.6.1
  • WordPress version: 6.3.1
  • First release: Aug 18, 2012
  • Latest release: May 11, 2017
  • Number of updates: 44
  • Update frequency: every 44.4 days
  • Top authors: roomshare (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /4,864 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▲2.57ms] Passed 4 tests

An overview of server-side resources used by Embed iPhone/iPad App
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1545.94 ▲3.80
Dashboard /wp-admin3.46 ▲0.1649.15 ▼0.19
Posts /wp-admin/edit.php3.58 ▲0.2250.43 ▲4.32
Add New Post /wp-admin/post-new.php6.04 ▲0.1692.08 ▲7.83
Media Library /wp-admin/upload.php3.39 ▲0.1634.59 ▲2.33
Embed iPhone App /wp-admin/options-general.php?page=embed_iphoneipad_app3.3331.23

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Embed iPhone/iPad App
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲14313.62 ▼1.034.99 ▲3.2537.49 ▼9.15
Dashboard /wp-admin2,215 ▲274.81 ▼0.10106.04 ▼2.6639.70 ▲1.18
Posts /wp-admin/edit.php2,098 ▲92.00 ▼0.0440.05 ▲0.8734.27 ▼3.35
Add New Post /wp-admin/post-new.php1,517 ▲317.43 ▼0.04672.13 ▼1.2156.94 ▲5.66
Media Library /wp-admin/upload.php1,394 ▲34.21 ▲0.02100.11 ▼2.5744.13 ▼0.97
Embed iPhone App /wp-admin/options-general.php?page=embed_iphoneipad_app9322.1824.2054.95

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=embed_iphoneipad_app
    • > Warning in wp-content/plugins/embed-iphoneipad-app/includes/Rsj/EmbedIphoneIpadApp.php+546
    array_key_exists() expects parameter 2 to be array, bool given
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=embed_iphoneipad_app
    • > Notice in wp-content/plugins/embed-iphoneipad-app/includes/Rsj/EmbedIphoneIpadApp.php+575
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=embed_iphoneipad_app
    • > Notice in wp-content/plugins/embed-iphoneipad-app/includes/Rsj/EmbedIphoneIpadApp.php+575
    Trying to access array offset on value of type null

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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/embed-iphoneipad-app/tests/bootstrap.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/embed-iphoneipad-app/tests/PhgTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/embed-iphoneipad-app/tests/Locale/ZendTest.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embed-iphoneipad-app/embed-iphoneipad-app.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/embed-iphoneipad-app/tests/Locale/IntlTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/embed-iphoneipad-app/tests/Locale/RawPhpTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/embed-iphoneipad-app/tests/LinkshareTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/embed-iphoneipad-app/tests/iTunesTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/embed-iphoneipad-app/tests/_SetupTest.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (sample formatted iPhone app on a post), #2 (admin settings), #3 (writing examples on WP HTML editor)
You can look at the official readme.txt

embed-iphoneipad-app/embed-iphoneipad-app.php Passed 13 tests

The main PHP script in "Embed iPhone/iPad App" version 1.5.1 is automatically included on every request by WordPress
46 characters long description:
Convert iTunes App Store Link To App Info HTML

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Please make sure to remedy the following
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/embed-iphoneipad-app/generate_test.bat
2,008 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP182595351,579
PO File193124298
CSS1211105
XML12020
DOS Batch1006

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity5.76
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes15.88%
▷ Concrete classes1694.12%
▷ Final classes00.00%
Methods131
▷ Static methods118.40%
▷ Public methods10479.39%
▷ Protected methods2619.85%
▷ Private methods10.76%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants1257.14%
▷ Class constants942.86%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.33MB with 0.20MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png116.03KB38.19KB▼ 67.09%
screenshot-2.png54.74KB21.07KB▼ 61.52%
screenshot-1.png168.60KB60.69KB▼ 64.00%
images/available_on_the_app_store.png2.97KB1.43KB▼ 51.84%