83% alx-extensions

Code Review | Alx Extensions

WordPress plugin Alx Extensions scored83%from 54 tests.

About plugin

  • Plugin page: alx-extensions
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2.2
  • WordPress version: 6.3.1
  • First release: May 31, 2018
  • Latest release: Aug 7, 2023
  • Number of updates: 47
  • Update frequency: every 40.3 days
  • Top authors: AlxMedia (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10,000+ active /146,850 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.20MB] [CPU: ▼3.39ms] Passed 4 tests

Server-side resources used by Alx Extensions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2037.41 ▲0.40
Dashboard /wp-admin3.49 ▲0.1951.47 ▲2.15
Posts /wp-admin/edit.php3.61 ▲0.2550.04 ▼0.65
Add New Post /wp-admin/post-new.php6.09 ▲0.2182.68 ▼15.46
Media Library /wp-admin/upload.php3.42 ▲0.1933.75 ▲3.10

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Alx Extensions
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.131.67 ▼0.0244.98 ▲4.28
Dashboard /wp-admin2,203 ▲154.83 ▼0.04111.87 ▲10.3439.07 ▼7.30
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0039.92 ▲0.6335.73 ▼0.32
Add New Post /wp-admin/post-new.php1,516 ▼2817.69 ▼0.69675.69 ▲53.5951.91 ▲2.70
Media Library /wp-admin/upload.php1,385 ▼34.18 ▼0.0496.29 ▼2.8643.84 ▼0.75

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_alxtabs
    • widget_recent-comments
    • widget_recent-posts
    • widget_alxposts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/alx-extensions/inc/post-formats.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/alx-extensions/alx-extensions.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alx-extensions/inc/share.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alx-extensions/inc/options.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/alx-extensions/inc/widgets/alx-posts.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alx-extensions/inc/share-footer.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/alx-extensions/inc/widgets/alx-tabs.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: The plugin tags were not defined
You can take inspiration from this readme.txt

alx-extensions/alx-extensions.php 85% from 13 tests

The main PHP file in "Alx Extensions" ver. 1.1.4 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 210 characters long)

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
Success! There were no dangerous files found in this plugin807 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP7147112779
JavaScript2101520
CSS1018

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity31.50
▷ Minimum class complexity16.00
▷ Maximum class complexity47.00
Average method complexity6.55
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin