78% wp-extra

Code Review | WP EXtra

WordPress plugin WP EXtra scored78%from 54 tests.

About plugin

  • Plugin page: wp-extra
  • Plugin version: 6.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2019
  • Latest release: Oct 11, 2023
  • Number of updates: 60
  • Update frequency: every 28.8 days
  • Top authors: wpvncom (100%)

Code review

54 tests

User reviews

36 reviews

Install metrics

10,000+ active /52,556 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼5.75ms] Passed 4 tests

An overview of server-side resources used by WP EXtra
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.64 ▼4.12
Dashboard /wp-admin3.57 ▲0.2351.72 ▼6.42
Posts /wp-admin/edit.php3.62 ▲0.2747.86 ▲0.18
Add New Post /wp-admin/post-new.php6.09 ▲0.2185.96 ▼12.64
Media Library /wp-admin/upload.php3.43 ▲0.2139.83 ▲6.74

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP EXtra
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7314.17 ▼0.271.82 ▲0.0244.26 ▲7.80
Dashboard /wp-admin2,222 ▲425.57 ▼0.0987.05 ▲1.7342.88 ▲3.56
Posts /wp-admin/edit.php2,124 ▲271.97 ▼0.0436.64 ▼1.0636.68 ▲3.59
Add New Post /wp-admin/post-new.php1,542 ▲923.13 ▼0.16661.69 ▼11.9458.93 ▲4.06
Media Library /wp-admin/upload.php1,424 ▲274.13 ▼0.13106.59 ▲11.1245.14 ▲3.45

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-extra/settings/resources/views/tab-menu.php
    • > /wp-content/plugins/wp-extra/settings/resources/views/section.php
    • > /wp-content/plugins/wp-extra/vendor/maciejczyzewski/bottomline/bench.php
  • 101× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_hide_class_attribute() on null in wp-content/plugins/wp-extra/settings/resources/views/options/number.php:1
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_hide_class_attribute() on null in wp-content/plugins/wp-extra/settings/resources/views/options/taxonomy.php:1
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-extra/settings/resources/views/section.php on line 9
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/wp-extra/settings/resources/views/options/code-editor.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-extra/vendor/maciejczyzewski/bottomline/tests/objects.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_hide_class_attribute() on null in wp-content/plugins/wp-extra/settings/resources/views/options/choices.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-extra/vendor/maciejczyzewski/bottomline/tests/collections.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WPVNTeam\\WPSettings\\Options\\OptionAbstract' not found in wp-content/plugins/wp-extra/src/WPSettings/Import.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WPVNTeam\\WPSettings\\Options\\OptionAbstract' not found in wp-content/plugins/wp-extra/settings/src/Options/Checkbox.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPVNTeam\\WPSettings\\Options\\OptionAbstract' not found in wp-content/plugins/wp-extra/settings/src/Options/Choices.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

wp-extra/wp-extra.php Passed 13 tests

The main PHP file in "WP EXtra" ver. 6.3 adds more information about the plugin and also serves as the entry point for this plugin
98 characters long description:
❤ This is a simple and perfect tool to use as your website’s functionality plugin. Awesome !!!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected8,298 lines of code in 160 files:
LanguageFilesBlank linesComment linesLines of code
PHP1401,4441,4427,222
PO File1145150393
Markdown2840272
JSON300168
JavaScript11111129
CSS10074
XML10030
YAML10010

PHP code Passed 2 tests

A brief analysis 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.37
Average class complexity11.95
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces15
Interfaces0
Traits1
Classes65
▷ Abstract classes11.54%
▷ Concrete classes6498.46%
▷ Final classes00.00%
Methods390
▷ Static methods287.18%
▷ Public methods37094.87%
▷ Protected methods30.77%
▷ Private methods174.36%
Functions84
▷ Named functions5565.48%
▷ Anonymous functions2934.52%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/maciejczyzewski/bottomline/screenshot-2.png46.98KB14.67KB▼ 68.77%
vendor/maciejczyzewski/bottomline/screenshot-1.png1.81KB0.24KB▼ 86.92%