78% wp-plugin-info-card

Code Review | WP Plugin Info Card

WordPress plugin WP Plugin Info Card scored78%from 54 tests.

About plugin

  • Plugin page: wp-plugin-info-card
  • Plugin version: 4.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.3
  • WordPress version: 6.3.1
  • First release: Nov 3, 2014
  • Latest release: Oct 13, 2023
  • Number of updates: 152
  • Update frequency: every 21.5 days
  • Top authors: briKou (58.55%)ronalfy (42.11%)

Code review

54 tests

User reviews

23 reviews

Install metrics

800+ active /31,649 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.39MB] [CPU: ▼3.88ms] 75% from 4 tests

A check of server-side resources used by WP Plugin Info Card
It is recommended to improve the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 963.58ms on /wp-admin/options-general.php?page=wp-plugin-info-card)
PageMemory (MB)CPU Time (ms)
Home /4.14 ▲0.6747.58 ▲8.20
Dashboard /wp-admin3.98 ▲0.6852.13 ▲3.88
Posts /wp-admin/edit.php4.02 ▲0.6751.91 ▲5.54
Add New Post /wp-admin/post-new.php5.50 ▼0.3958.81 ▼30.99
Media Library /wp-admin/upload.php3.83 ▲0.6037.96 ▲6.07
WP Plugin Info Card /wp-admin/options-general.php?page=wp-plugin-info-card3.96963.58

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 70 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Plugin Info Card
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲2313.24 ▼1.312.80 ▲1.0344.87 ▲9.62
Dashboard /wp-admin2,218 ▲415.82 ▲0.2493.61 ▲3.2041.75 ▲0.56
Posts /wp-admin/edit.php2,110 ▲102.02 ▲0.0840.04 ▲7.0335.85 ▼0.65
Add New Post /wp-admin/post-new.php6,216 ▲4,68221.86 ▲3.83849.92 ▲219.8678.09 ▲3.95
Media Library /wp-admin/upload.php1,404 ▲74.16 ▼0.0297.58 ▲3.3141.31 ▼2.48
WP Plugin Info Card /wp-admin/options-general.php?page=wp-plugin-info-card1,5682.0734.0061.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-plugin-info-card/wp-plugin-info-card.php
    • > /wp-content/plugins/wp-plugin-info-card/functions.php
  • 29× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/template.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-plugin-info-card/templates/wppic-template-plugin-wordpress.php on line 11
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/template.php): failed to open stream: No such file or directory in wp-content/plugins/wp-plugin-info-card/templates/wppic-template-theme-wordpress.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_trim_words() in wp-content/plugins/wp-plugin-info-card/templates/wppic-template-plugin-flex.php:42
    • > PHP Notice
      Trying to get property 'url' of non-object in wp-content/plugins/wp-plugin-info-card/templates/wppic-template-plugin-large.php on line 45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-plugin-info-card/templates/wppic-template-plugin.php:45
    • > PHP Notice
      Trying to get property 'url' of non-object in wp-content/plugins/wp-plugin-info-card/templates/wppic-template-theme.php on line 23
    • > PHP Notice
      Undefined variable: wppic_data in wp-content/plugins/wp-plugin-info-card/templates/wppic-template-plugin-flex.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-plugin-info-card/templates/wppic-template-plugin-large.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-plugin-info-card/templates/wppic-template-theme-large.php:23
    • > PHP Notice
      Trying to get property 'url' of non-object in wp-content/plugins/wp-plugin-info-card/templates/wppic-template-theme-flex.php on line 25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: plugin, gutenberg, blocks, card, block...

wp-plugin-info-card/wp-plugin-info-card.php 92% from 13 tests

The entry point to "WP Plugin Info Card" version 4.0.9 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 194 characters long)

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
No dangerous file extensions were detected9,451 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript81,2276924,155
PHP306111,0923,233
PO File4403991938
CSS513319747
JSON400367
SVG20111

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity28.69
▷ Minimum class complexity1.00
▷ Maximum class complexity155.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods124
▷ Static methods4737.90%
▷ Public methods11995.97%
▷ Protected methods00.00%
▷ Private methods54.03%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/default-banner.png4.22KB0.18KB▼ 95.65%
assets/img/wppic.png3.29KB0.63KB▼ 80.74%
assets/img/wp-pic-sprite.png27.94KB6.75KB▼ 75.83%