10% easy-smart-phone-tablet-desktop-website-thumbnail-preview

Code Review | Page2Images Website Thumbnail

WordPress plugin Page2Images Website Thumbnail scored10%from 54 tests.

About plugin

  • Plugin page: easy-smart-phone-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 21, 2013
  • Latest release: Nov 21, 2013
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: SuzhouKada (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,229 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/easy-smart-phone-tablet-desktop-website-thumbnail-preview/wplib/utils_formbuilder.inc.php+65
    Methods with the same name as their class will not be constructors in a future version of PHP; FormBuilder has a deprecated constructor

Server metrics [RAM: ▼1.65MB] [CPU: ▼55.31ms] Passed 4 tests

Server-side resources used by Page2Images Website Thumbnail
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.33 ▼1.135.35 ▼35.09
Dashboard /wp-admin2.35 ▼0.955.93 ▼47.61
Posts /wp-admin/edit.php2.35 ▼1.007.39 ▼41.12
Add New Post /wp-admin/post-new.php2.35 ▼3.537.28 ▼97.42
Media Library /wp-admin/upload.php2.35 ▼0.886.75 ▼25.97
Page2Images /wp-admin/admin.php?page=p2i_menu_main2.356.55
How to use /wp-admin/admin.php?page=p2i_documentation2.358.52

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Page2Images Website Thumbnail
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.24 ▼1.121.63 ▼0.3040.24 ▼3.99
Dashboard /wp-admin2,227 ▲365.81 ▲0.96102.24 ▲1.9540.25 ▲1.43
Posts /wp-admin/edit.php2,116 ▲272.13 ▲0.1241.83 ▲2.5935.17 ▼1.93
Add New Post /wp-admin/post-new.php1,555 ▲3323.11 ▼0.04690.00 ▲89.4264.06 ▲13.33
Media Library /wp-admin/upload.php1,418 ▲304.19 ▼0.0096.71 ▼1.5645.27 ▼0.87
Page2Images /wp-admin/admin.php?page=p2i_menu_main1,1022.0424.2131.28
How to use /wp-admin/admin.php?page=p2i_documentation9852.0222.3030.89

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/easy-smart-phone-tablet-desktop-website-thumbnail-preview/wplib/utils_formbuilder.inc.php+65
    Methods with the same name as their class will not be constructors in a future version of PHP; FormBuilder has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% 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 server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=p2i_documentation
    • > Deprecated in wp-content/plugins/easy-smart-phone-tablet-desktop-website-thumbnail-preview/wplib/utils_formbuilder.inc.php+65
    Methods with the same name as their class will not be constructors in a future version of PHP; FormBuilder has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=p2i_documentation
    • > Deprecated in wp-content/plugins/easy-smart-phone-tablet-desktop-website-thumbnail-preview/wplib/utils_formbuilder.inc.php+680
    Methods with the same name as their class will not be constructors in a future version of PHP; FormElement has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=p2i_documentation
    • > Warning in wp-content/plugins/easy-smart-phone-tablet-desktop-website-thumbnail-preview/wplib/utils_settings.inc.php+61
    Declaration of SettingsForm::handleSave($formValues) should be compatible with EasyForm::handleSave()
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=p2i_documentation
    • > Deprecated in wp-content/plugins/easy-smart-phone-tablet-desktop-website-thumbnail-preview/wplib/utils_pagebuilder.inc.php+23
    Methods with the same name as their class will not be constructors in a future version of PHP; PageBuilder has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=p2i_documentation
    • > Deprecated in wp-content/plugins/easy-smart-phone-tablet-desktop-website-thumbnail-preview/wplib/utils_tablebuilder.inc.php+24
    Methods with the same name as their class will not be constructors in a future version of PHP; TableBuilder has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=p2i_documentation
    • > Deprecated in wp-content/plugins/easy-smart-phone-tablet-desktop-website-thumbnail-preview/wplib/utils_tablebuilder.inc.php+156
    Methods with the same name as their class will not be constructors in a future version of PHP; RowData has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=p2i_documentation
    • > Deprecated in wp-content/plugins/easy-smart-phone-tablet-desktop-website-thumbnail-preview/wplib/utils_tablebuilder.inc.php+199
    Methods with the same name as their class will not be constructors in a future version of PHP; TableColumn has a deprecated constructor

SRP 50% 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
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Declaration of SettingsForm::handleSave($formValues) should be compatible with EasyForm::handleSave() in wp-content/plugins/easy-smart-phone-tablet-desktop-website-thumbnail-preview/wplib/utils_settings.inc.php on line 61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/easy-smart-phone-tablet-desktop-website-thumbnail-preview/p2i-wp-thumbnails.php:36
    • > PHP Warning
      Declaration of SettingsForm::handleSave($formValues) should be compatible with EasyForm::handleSave() in wp-content/plugins/easy-smart-phone-tablet-desktop-website-thumbnail-preview/wplib/utils_settings.inc.php on line 61

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === easy-smart-phone-tablet-desktop-website-thumbnail-preview === )
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: Add images for these screenshots: #1 (The website [Http://yahoo.com] thumbnail preview on iPhone), #2 (The website [Http://yahoo.com] thumbnail preview on iPad), #3 (The website [Http://yahoo.com] thumbnail preview on Desktop)
You can look at the official readme.txt

easy-smart-phone-tablet-desktop-website-thumbnail-preview/p2i-wp-thumbnails.php 92% from 13 tests

The main PHP script in "Page2Images Website Thumbnail" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-smart-phone-tablet-desktop-website-thumbnail-preview.php" instead of "p2i-wp-thumbnails.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,505 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP85031,0381,505

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.45
Average class complexity29.25
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods77
▷ Static methods11.30%
▷ Public methods6989.61%
▷ Protected methods67.79%
▷ Private methods22.60%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin