10% pictips

Code Review | PicTips

WordPress plugin PicTips scored 10% from 53 tests.

About plugin

  • Plugin page: pictips
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.5
  • WordPress version: 5.8.1
  • First release: Feb 17, 2013
  • Latest release: May 8, 2013
  • Number of updates: 3
  • Update frequency: every 26.7 days
  • Top authors: 8MediaCentral (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

20+ active / 1,753 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/pictips/pictips.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; pictips has a deprecated constructor

Server metrics [RAM: ▼1.84MB] [CPU: ▼312.60ms] Passed 4 tests

An overview of server-side resources used by PicTips
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.79 ▼1.049.39 ▼20.55
Dashboard /wp-admin1.81 ▼1.246.59 ▼36.18
Posts /wp-admin/edit.php1.81 ▼1.305.81 ▼32.02
Add New Post /wp-admin/post-new.php1.81 ▼3.625.07 ▼1,139.53
Media Library /wp-admin/upload.php1.81 ▼1.205.76 ▼42.67
PicTips /wp-admin/options-general.php?page=pictips_display1.815.32

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for PicTips
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,659 ▲7715.85 ▼0.077.69 ▲0.8844.24 ▼5.57
Dashboard /wp-admin2,940 ▲905.97 ▲0.12141.06 ▲4.15112.79 ▲1.61
Posts /wp-admin/edit.php2,713 ▲72.69 ▲0.0167.78 ▲3.7894.91 ▲6.36
Add New Post /wp-admin/post-new.php1,595 ▼5813.59 ▼5.33296.43 ▼98.67111.44 ▼3.21
Media Library /wp-admin/upload.php1,776 ▲15.00 ▼0.02144.33 ▼27.07114.58 ▼6.95
PicTips /wp-admin/options-general.php?page=pictips_display1,1772.0859.8170.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/pictips/pictips.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; pictips has a deprecated constructor

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=pictips_display
    • > Deprecated in wp-content/plugins/pictips/pictips.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; pictips has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=pictips_display
    • > Deprecated in wp-content/plugins/pictips/php/pictips-settings.php+27
    Methods with the same name as their class will not be constructors in a future version of PHP; eightmc_settings has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=pictips_display
    • > Warning in wp-content/plugins/pictips/php/pictips-settings.php+35
    include_once(premium-settings.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/options-general.php?page=pictips_display
    • > Warning in wp-content/plugins/pictips/php/pictips-settings.php+35
    include_once(): Failed opening 'premium-settings.php' for inclusion (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/options-general.php?page=pictips_display
    • > Deprecated in wp-content/plugins/pictips/php/pictips-custom-styles-main.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; pictips_custom_styles_main has a deprecated constructor

SRP 50% 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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/pictips/php/pictips-settings.php:73
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pictips/pictips.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2 in pictips/assets to your readme.txt
You can look at the official readme.txt

pictips/pictips.php Passed 13 tests

The main file in "PicTips" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
50 characters long description:
Provides a shortcode for adding images as ToolTips

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected849 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3189207489
JavaScript210241293
CSS3193267

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity23.67
▷ Minimum class complexity5.00
▷ Maximum class complexity60.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/pictipsbutton.png0.83KB1.21KB0.00%
img/imageloading.png7.37KB3.25KB▼ 55.90%