71% theme-options-itech-avengers

Code Review | Theme Options - iTech Avengers

WordPress plugin Theme Options - iTech Avengers scored71%from 54 tests.

About plugin

  • Plugin page: theme-options-ite...
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1
  • WordPress version: 6.3.1
  • First release: Oct 4, 2022
  • Latest release: Nov 14, 2022
  • Number of updates: 6
  • Update frequency: every 6.8 days
  • Top authors: itechavengers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /199 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.74ms] Passed 4 tests

Server-side resources used by Theme Options - iTech Avengers
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0624.38 ▼11.42
Dashboard /wp-admin3.34 ▲0.0345.51 ▼2.66
Posts /wp-admin/edit.php3.39 ▲0.0344.34 ▼1.29
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.44 ▼3.37
Media Library /wp-admin/upload.php3.26 ▲0.0332.49 ▼1.52
Footer /wp-admin/admin.php?page=options-footer3.2228.68
General /wp-admin/admin.php?page=avengers-theme-options3.2331.06

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Theme Options - iTech Avengers
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8514.47 ▼0.111.85 ▲0.2040.49 ▲1.67
Dashboard /wp-admin2,237 ▲524.82 ▼1.0598.31 ▼8.8738.93 ▼0.01
Posts /wp-admin/edit.php2,120 ▲312.04 ▲0.0340.52 ▲4.6336.14 ▲0.51
Add New Post /wp-admin/post-new.php1,550 ▲3118.15 ▼4.91610.71 ▼49.6454.11 ▼5.70
Media Library /wp-admin/upload.php1,419 ▲314.17 ▼0.0595.21 ▼6.7843.36 ▲1.88
Footer /wp-admin/admin.php?page=options-footer1,0132.0325.1282.92
General /wp-admin/admin.php?page=avengers-theme-options1,3481.6927.2049.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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
Please fix the following server-side errors
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=avengers-theme-options
    • > Notice in wp-content/plugins/theme-options-itech-avengers/tabs/social_links.php+71
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=avengers-theme-options
    • > Warning in wp-content/plugins/theme-options-itech-avengers/input-global.php+47
    include(): http:// wrapper is disabled in the server configuration by allow_url_include=0
    • > GET request to /wp-admin/admin.php?page=avengers-theme-options
    • > Warning in wp-content/plugins/theme-options-itech-avengers/input-global.php+47
    include(http://wp.com/wp-content/plugins/theme-options-itech-avengers/tabs/footer.php): failed to open stream: no suitable wrapper could be found
    • > GET request to /wp-admin/admin.php?page=avengers-theme-options
    • > Warning in wp-content/plugins/theme-options-itech-avengers/input-global.php+47
    include(): Failed opening 'http://wp.com/wp-content/plugins/theme-options-itech-avengers/tabs/footer.php' for inclusion (include_path='.:/usr/share/php')

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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/theme-options-itech-avengers/avengers-theme-options.php
    • > /wp-content/plugins/theme-options-itech-avengers/tabs/sidebar.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/theme-options-itech-avengers/tabs/help.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/theme-options-itech-avengers/tabs/global_settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/theme-options-itech-avengers/tabs/social_links.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/theme-options-itech-avengers/input-global.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/theme-options-itech-avengers/options-header.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/theme-options-itech-avengers/options-footer.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/theme-options-itech-avengers/shortcodes.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/theme-options-itech-avengers/instructions.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

theme-options-itech-avengers/avengers-theme-options.php 77% from 13 tests

This is the main PHP file of "Theme Options - iTech Avengers" version 1.1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 283 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("theme-options-itech-avengers.php" instead of "avengers-theme-options.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin3,168 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
SVG2001,208
CSS416241,094
PHP124243539
JavaScript22916327

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.64MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-128x128.png22.52KB6.76KB▼ 69.97%
assets/images/company-logo.png4.39KB2.36KB▼ 46.31%
assets/images/screenshot-02.png104.62KB37.39KB▼ 64.26%
assets/images/screenshot-01.png64.28KB19.69KB▼ 69.37%
assets/images/banner-772x250.png386.03KB119.82KB▼ 68.96%