10% intravert

Code Review | Intravert for Wordpress

WordPress plugin Intravert for Wordpress scored10%from 54 tests.

About plugin

  • Plugin page: intravert
  • Plugin version: 1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 14, 2019
  • Latest release: Aug 20, 2019
  • Number of updates: 6
  • Update frequency: every 11.2 days
  • Top authors: dmonn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /684 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
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/intravert/modules/widgets.php+85
    Function create_function() is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼60.77ms] Passed 4 tests

A check of server-side resources used by Intravert for Wordpress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.37 ▼40.03
Dashboard /wp-admin2.05 ▼1.305.98 ▼58.65
Posts /wp-admin/edit.php2.05 ▼1.315.80 ▼49.24
Add New Post /wp-admin/post-new.php2.05 ▼3.845.62 ▼95.16
Media Library /wp-admin/upload.php2.05 ▼1.185.23 ▼32.60
Intravert /wp-admin/options-general.php?page=wap_settings2.056.71

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_ads_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Intravert for Wordpress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,386 ▲64016.54 ▲2.3317.43 ▲15.8045.57 ▲3.47
Dashboard /wp-admin2,344 ▲1676.18 ▲0.53100.11 ▲11.3742.39 ▼2.41
Posts /wp-admin/edit.php2,344 ▲2413.33 ▲1.3946.50 ▲1.8029.40 ▼11.25
Add New Post /wp-admin/post-new.php1,541 ▲1318.52 ▼4.44603.15 ▼95.7545.15 ▼10.82
Media Library /wp-admin/upload.php1,413 ▲104.04 ▼0.0978.38 ▼32.4344.23 ▼1.82
Intravert /wp-admin/options-general.php?page=wap_settings1,1952.9741.0359.79

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
    • > Deprecated in wp-content/plugins/intravert/modules/widgets.php+85
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_ads_widget
    • db_upgraded

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 errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wap_settings
    • > Deprecated in wp-content/plugins/intravert/modules/widgets.php+85
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=wap_settings
    • > Notice in wp-content/plugins/intravert/modules/hooks.php+100
    Undefined index: adsapi
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wap_settings
    • > Notice in wp-content/plugins/intravert/modules/settings.php+97
    Undefined index: refresh
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wap_settings
    • > Notice in wp-content/plugins/intravert/modules/settings.php+432
    Undefined variable: locale_taro
    • > GET request to /wp-admin/options-general.php?page=wap_settings
    • > Notice in wp-content/plugins/intravert/modules/settings.php+13
    Undefined index: save_settings_field
    • > GET request to /wp-admin/options-general.php?page=wap_settings
    • > Notice in wp-content/plugins/intravert/modules/settings.php+119
    Undefined variable: out
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wap_settings
    • > Notice in wp-content/plugins/intravert/modules/settings.php+160
    Undefined index: id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wap_settings
    • > Notice in wp-content/plugins/intravert/modules/settings.php+160
    Undefined index: class
    • > GET request to /wp-admin/options-general.php?page=wap_settings
    • > Notice in wp-content/plugins/intravert/modules/settings.php+138
    Undefined index: placeholder
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wap_settings
    • > Notice in wp-content/plugins/intravert/modules/settings.php+174
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=wap_settings
    • > Notice in wp-content/plugins/intravert/modules/settings.php+160
    Undefined index: style
    • > GET request to /wp-admin/options-general.php?page=wap_settings
    • > Notice in wp-content/plugins/intravert/modules/settings.php+167
    Undefined index: sub_text

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
Almost there! Just fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/intravert/modules/widgets.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/intravert/modules/settings.php:424
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/intravert/modules/shortcodes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/intravert/modules/scripts.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/intravert/modules/scripts.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/intravert/modules/hooks.php:98

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: sponsor, billboard, ads, advertisement, ad space...

intravert/wp-intravert-api.php 92% from 13 tests

The entry point to "Intravert for Wordpress" version 1.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("intravert.php" instead of "wp-intravert-api.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin8,187 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS3207,487
PHP621320692
JavaScript2408

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity17.60
▷ Minimum class complexity2.00
▷ Maximum class complexity54.00
Average method complexity5.88
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/inc/assets/img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%
modules/inc/assets/img/glyphicons-halflings-white.png8.57KB9.20KB0.00%