62% theme-wing

Code Review | Theme Wing

WordPress plugin Theme Wing scored62%from 54 tests.

About plugin

  • Plugin page: theme-wing
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: Apr 1, 2022
  • Latest release: Apr 1, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: blazethemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /577 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼1.20MB] [CPU: ▼43.92ms] Passed 4 tests

This is a short check of server-side resources used by Theme Wing
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.77 ▼0.7015.05 ▼31.52
Dashboard /wp-admin2.81 ▼0.4916.03 ▼39.15
Posts /wp-admin/edit.php2.82 ▼0.5419.07 ▼25.86
Add New Post /wp-admin/post-new.php2.81 ▼3.0719.65 ▼79.13
Media Library /wp-admin/upload.php2.82 ▼0.4116.87 ▼16.85
Theme Wing /wp-admin/themes.php?page=theme_wing_settings2.8217.82

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Theme Wing
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲6413.25 ▼1.051.75 ▼0.3241.59 ▲3.12
Dashboard /wp-admin2,216 ▲344.87 ▼0.93117.21 ▲9.3046.68 ▲2.85
Posts /wp-admin/edit.php2,102 ▲132.03 ▼0.0341.16 ▼1.4834.47 ▼3.66
Add New Post /wp-admin/post-new.php1,523 ▼1223.14 ▲0.18619.23 ▼54.4462.79 ▲4.87
Media Library /wp-admin/upload.php1,392 ▲44.22 ▼0.0398.94 ▼2.4141.44 ▼2.79
Theme Wing /wp-admin/themes.php?page=theme_wing_settings9577.79201.0329.84

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
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/theme-wing/admin/class-posttypes.php+74
    Invalid argument supplied for foreach()
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=theme_wing_settings
    • > Warning in wp-content/plugins/theme-wing/admin/class-posttypes.php+74
    Invalid argument supplied for foreach()

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
Please fix the following
  • 14× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-wing/admin/metaboxes/metaboxes.php:131
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/theme-wing/admin/class-posttypes.php:40
    • > PHP Warning
      Use of undefined constant THEME_WING_PATH - assumed 'THEME_WING_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/theme-wing/admin/class-theme-wing-admin.php on line 61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-wing/admin/class-theme-wing-admin.php:48
    • > PHP Warning
      include(THEME_WING_PATH/admin/class-posttypes.php): failed to open stream: No such file or directory in wp-content/plugins/theme-wing/admin/class-theme-wing-admin.php on line 60
    • > PHP Warning
      Use of undefined constant THEME_WING_PATH - assumed 'THEME_WING_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/theme-wing/admin/class-theme-wing-admin.php on line 60
    • > PHP Warning
      include(THEME_WING_PATH/admin/metaboxes/metaboxes.php): failed to open stream: No such file or directory in wp-content/plugins/theme-wing/admin/class-theme-wing-admin.php on line 62
    • > PHP Warning
      include(THEME_WING_PATH/admin/admin-helpers.php): failed to open stream: No such file or directory in wp-content/plugins/theme-wing/admin/class-theme-wing-admin.php on line 61
    • > PHP Warning
      Use of undefined constant THEME_WING_PATH - assumed 'THEME_WING_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/theme-wing/admin/class-theme-wing-admin.php on line 62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/theme-wing/theme-wing.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/themes.php?page=theme_wing_settings
    • > Console-api (severe) in unknown
    /wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0 9:53544 TypeError: Cannot read properties of null (reading 'includes')at /wp-content/plugins/theme-wing//admin/core/build/index.js?ver=1.0.0:352:31at Ur (/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:73411)at El (/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:93232)at fl (/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:85548)at Nn (/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:32474)at al (/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:82721)at Jt (/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:52962)at Object. (/wp-content/plugins/theme-wing//admin/core/build/index.js?ver=1.0.0:345:11)at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)
    • > GET request to /wp-admin/themes.php?page=theme_wing_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'includes')" "TypeError: Cannot read properties of null (reading 'includes')\n at /wp-content/plugins/theme-wing//admin/core/build/index.js?ver=1.0.0:352:31\n at Ur (/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:73411)\n at El (/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:93232)\n at fl (/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:85548)\n at Nn (/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:32474)\n at al (/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:82721)\n at Jt (/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0:10:52962)\n at Object.\u003Canonymous> (/wp-content/plugins/theme-wing//admin/core/build/index.js?ver=1.0.0:345:11)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined

Optimizations

Plugin configuration 93% 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
6 plugin tags: cusmtomizer, custom fields, custom post type, post type, blazethemes...

theme-wing/theme-wing.php 85% from 13 tests

The main PHP script in "Theme Wing" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")

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
Success! There were no dangerous files found in this plugin13,825 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,552
CSS41,513183,183
PHP785279706
JavaScript27282384

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 problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity6.67
▷ Minimum class complexity4.00
▷ Maximum class complexity9.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods29.52%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin