10% functionality-for-zap-theme

Code Review | Functionality for Zap theme

WordPress plugin Functionality for Zap theme scored 10% from 54 tests.

About plugin

  • Plugin page: functionality-for...
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.8
  • WordPress version: 5.9.2
  • First release: Mar 20, 2016
  • Latest release: Jun 5, 2017
  • Number of updates: 11
  • Update frequency: every 40.4 days
  • Top authors: Cohhe (81.82%)sprincis (27.27%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 3,845 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-recent-posts-plus.php+451
    Function create_function() is deprecated

Server metrics [RAM: ▼2.53MB] [CPU: ▼343.19ms] Passed 4 tests

Server-side resources used by Functionality for Zap theme
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.84 ▼1.673.99 ▼45.85
Dashboard /wp-admin1.86 ▼1.553.88 ▼28.61
Posts /wp-admin/edit.php1.86 ▼1.784.01 ▼30.86
Add New Post /wp-admin/post-new.php1.86 ▼5.114.82 ▼1,267.42
Media Library /wp-admin/upload.php1.86 ▼1.433.38 ▼19.59
Location Categories /wp-admin/edit-tags.php?taxonomy=location_category&post_type=locations1.863.76
Project Categories /wp-admin/edit-tags.php?taxonomy=project_category&post_type=projects1.864.79
Projects /wp-admin/edit.php?post_type=projects1.863.57
Services /wp-admin/edit.php?post_type=service1.864.46
Add New /wp-admin/post-new.php?post_type=locations1.863.67
Service Categories /wp-admin/edit-tags.php?taxonomy=service_category&post_type=service1.864.01
Add New /wp-admin/post-new.php?post_type=service1.863.90
Locations /wp-admin/edit.php?post_type=locations1.864.09
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php1.863.78
Add New /wp-admin/post-new.php?post_type=projects1.863.06

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_zap_author
widget_recent-comments
widget_recent-posts-plus
widget_fastflickrwidget
widget_zap-directory-followers

Browser metrics Passed 4 tests

An overview of browser requirements for Functionality for Zap theme
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,077 ▲33317.01 ▲0.9712.72 ▲6.502.41 ▲0.24
Dashboard /wp-admin3,027 ▲1666.01 ▼0.15116.27 ▼12.59155.69 ▼4.79
Posts /wp-admin/edit.php2,825 ▲1313.26 ▲0.0263.12 ▼0.01138.55 ▼2.11
Add New Post /wp-admin/post-new.php1,802 ▲14117.39 ▲1.68393.22 ▼27.86168.58 ▲11.80
Media Library /wp-admin/upload.php1,841 ▲1435.56 ▲0.01140.97 ▲3.20184.41 ▲1.26
Location Categories /wp-admin/edit-tags.php?taxonomy=location_category&post_type=locations1,7562.7858.59108.60
Project Categories /wp-admin/edit-tags.php?taxonomy=project_category&post_type=projects1,7652.8154.54108.49
Projects /wp-admin/edit.php?post_type=projects1,5143.1858.86110.18
Services /wp-admin/edit.php?post_type=service1,5173.1759.68112.27
Add New /wp-admin/post-new.php?post_type=locations3,36210.20188.44199.70
Service Categories /wp-admin/edit-tags.php?taxonomy=service_category&post_type=service1,7652.7955.39109.22
Add New /wp-admin/post-new.php?post_type=service3,1279.89187.81190.45
Locations /wp-admin/edit.php?post_type=locations1,5172.9659.92111.84
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php9,15520.64478.73150.37
Add New /wp-admin/post-new.php?post_type=projects3,1479.97178.99191.37

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
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-recent-posts-plus.php+451
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_zap-directory-followers
    • widget_recent-posts
    • widget_fastflickrwidget
    • widget_zap_author
    • widget_recent-posts-plus
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=projects
    • > Deprecated in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+291
    Function create_function() is deprecated
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+115
    Undefined index: title
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+116
    Undefined index: username
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+117
    Undefined index: view
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+118
    Undefined index: before_item
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+119
    Undefined index: after_item
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+120
    Undefined index: before_widget
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+121
    Undefined index: after_widget
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+122
    Undefined index: items
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+123
    Undefined index: more_title
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+124
    Undefined index: tags
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+125
    Undefined index: target
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+126
    Undefined index: show_titles
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+127
    Undefined index: thickbox
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+128
    Undefined index: random
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+129
    Undefined index: random_tag
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php+130
    Undefined index: javascript
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-includes/class-wp-customize-nav-menus.php+1152
    Trying to get property 'title' of non-object

SRP 0% 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
Please fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/functionality-for-zap-theme/public/partials/zap-functionality-public-display.php
    • > /wp-content/plugins/functionality-for-zap-theme/admin/partials/zap-functionality-admin-display.php
    • > /wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-recent-posts-plus.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/functionality-for-zap-theme/includes/metaboxes/templates/layouts.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-fast-flickr.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/functionality-for-zap-theme/includes/metaboxes/layouts.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-about-author.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/functionality-for-zap-theme/includes/widgets/widget-followers.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
1 plugin tags: zap

functionality-for-zap-theme/functionality-for-zap-theme.php Passed 13 tests

The main PHP file in "Functionality for Zap theme" ver. 1.2.4 adds more information about the plugin and also serves as the entry point for this plugin
49 characters long description:
This plugin contains Zap theme core functionality

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin4,293 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP227071,0553,046
CSS216513898
JavaScript43382178
PO File176163171

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity12.83
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes28.33%
▷ Concrete classes2291.67%
▷ Final classes00.00%
Methods128
▷ Static methods1310.16%
▷ Public methods11085.94%
▷ Protected methods21.56%
▷ Private methods1612.50%
Functions39
▷ Named functions39100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
7 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/before-after-sep.png17.93KB0.27KB▼ 98.51%
public/images/marker.png5.71KB2.92KB▼ 48.89%
public/images/layout-right.png0.54KB0.76KB0.00%
public/images/select-triangle.png17.73KB0.21KB▼ 98.80%
public/images/layout-left.png0.48KB0.62KB0.00%