78% enlarge-text

Code Review | Enlarge Text

WordPress plugin Enlarge Text scored78%from 54 tests.

About plugin

  • Plugin page: enlarge-text
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.3
  • WordPress version: 6.3.1
  • First release: Mar 10, 2012
  • Latest release: Sep 4, 2015
  • Number of updates: 28
  • Update frequency: every 45.6 days
  • Top authors: scofennell@gmail.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /7,249 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.71ms] Passed 4 tests

This is a short check of server-side resources used by Enlarge Text
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0743.27 ▼1.16
Dashboard /wp-admin3.38 ▲0.0344.31 ▼16.39
Posts /wp-admin/edit.php3.49 ▲0.1343.62 ▼1.68
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.34 ▼7.61
Media Library /wp-admin/upload.php3.30 ▲0.0733.83 ▼0.93

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_text_size_widget

Browser metrics Passed 4 tests

Checking browser requirements for Enlarge Text
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲16813.66 ▼0.925.71 ▲3.5741.02 ▼10.12
Dashboard /wp-admin2,214 ▲264.90 ▼0.9997.65 ▼22.0036.98 ▼6.78
Posts /wp-admin/edit.php2,094 ▲52.02 ▼0.0134.51 ▼1.5133.13 ▼3.43
Add New Post /wp-admin/post-new.php1,538 ▲323.13 ▲0.02673.99 ▼14.3353.65 ▼0.31
Media Library /wp-admin/upload.php1,393 ▲54.24 ▲0.0595.57 ▼6.0644.57 ▲0.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_text_size_widget
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/enlarge-text/enlarge-text.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/enlarge-text/inc/class.js.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/enlarge-text/inc/class.widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/enlarge-text/inc/class.shortcode.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/enlarge-text/inc/class.enqueue.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: text sizer, text resize, enlarge text

enlarge-text/enlarge-text.php 85% from 13 tests

"Enlarge Text" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 203 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
Good job! No executable or dangerous file extensions detected402 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6254285402

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.80
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1266.67%
▷ Protected methods00.00%
▷ Private methods633.33%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
There are no PNG files in this plugin