79% functionality

Code Review | Functionality

WordPress plugin Functionality scored79%from 54 tests.

About plugin

  • Plugin page: functionality
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 6, 2013
  • Latest release: Dec 1, 2020
  • Number of updates: 22
  • Update frequency: every 121.6 days
  • Top authors: bungeshea (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

2,000+ active /41,412 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.04MB] [CPU: ▼7.67ms] Passed 4 tests

This is a short check of server-side resources used by Functionality
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.96 ▼10.48
Dashboard /wp-admin3.36 ▲0.0153.30 ▼11.55
Posts /wp-admin/edit.php3.47 ▲0.1151.16 ▼3.19
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.83 ▼5.45
Media Library /wp-admin/upload.php3.28 ▲0.0536.05 ▼0.74

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Functionality: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.17 ▼0.011.80 ▼0.0844.74 ▲1.96
Dashboard /wp-admin2,199 ▲195.65 ▼0.0081.00 ▼10.6139.62 ▼6.69
Posts /wp-admin/edit.php2,104 ▲12.05 ▲0.0736.07 ▼5.0733.52 ▼4.37
Add New Post /wp-admin/post-new.php1,529 ▼1117.45 ▼0.57672.48 ▲59.0850.02 ▼6.25
Media Library /wp-admin/upload.php1,407 ▲74.20 ▼0.0194.20 ▼10.5043.47 ▼0.59
Edit Functions /wp-admin/functionality-functions.php260.440.0815.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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 items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Functionality_File' not found in wp-content/plugins/functionality/php/class-styles.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/functionality/functionality.php:67
    • > PHP Fatal error
      Uncaught Error: Class 'Functionality_File' not found in wp-content/plugins/functionality/php/class-functions.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/functionality-functions.php
    • > Network (severe)
    wp-admin/functionality-functions.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: functionality, functionsphp

functionality/functionality.php Passed 13 tests

Analyzing the main PHP file in "Functionality" version 2.0.0
123 characters long description:
Makes it easy to create and edit your own functionality plugin for pasting snippets instead of in the theme's functions.php

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin294 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5112245260
PO File17934

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity8.25
▷ Minimum class complexity2.00
▷ Maximum class complexity13.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods2592.59%
▷ Protected methods13.70%
▷ Private methods13.70%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
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
There were not PNG files found in your plugin