10% say-what

Code Review | Say what?

WordPress plugin Say what? scored10%from 54 tests.

About plugin

  • Plugin page: say-what
  • Plugin version: 2.1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.4
  • WordPress version: 6.3.1
  • First release: Mar 8, 2013
  • Latest release: Nov 28, 2023
  • Number of updates: 109
  • Update frequency: every 35.9 days
  • Top authors: leewillis77 (100%)

Code review

54 tests

User reviews

90 reviews

Install metrics

40,000+ active /467,132 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/say-what/say-what-frontend.php+22
    Invalid argument supplied for foreach()

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.59ms] Passed 4 tests

A check of server-side resources used by Say what?
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.88 ▲0.43
Dashboard /wp-admin3.40 ▲0.0947.67 ▼1.51
Posts /wp-admin/edit.php3.51 ▲0.1546.63 ▲2.37
Add New Post /wp-admin/post-new.php6.00 ▲0.1197.94 ▼3.63
Media Library /wp-admin/upload.php3.32 ▲0.0938.44 ▲2.97
Text changes /wp-admin/tools.php?page=say_what_admin3.3434.17

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 56 new files
Database: 1 new table, 7 new options
New tables
wp_say_what_strings
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
say_what_db_version
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Say what?
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9014.24 ▼0.102.72 ▲0.9038.18 ▼6.08
Dashboard /wp-admin2,198 ▲175.55 ▼0.1592.51 ▼15.5439.77 ▲0.90
Posts /wp-admin/edit.php2,112 ▲92.04 ▲0.0238.69 ▼0.7334.21 ▼1.27
Add New Post /wp-admin/post-new.php1,534 ▲823.01 ▼0.17668.75 ▲64.7056.01 ▲2.70
Media Library /wp-admin/upload.php1,409 ▲94.13 ▼0.0698.63 ▲1.0240.01 ▼3.45
Text changes /wp-admin/tools.php?page=say_what_admin1,0522.1225.1156.10

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
The following items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_say_what_strings
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • say_what_db_version
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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
The following issues need your attention
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/say-what/say-what-list-table.class.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/say-what/html/say-what-admin-delete.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI\\CommandWithDBObject' not found in wp-content/plugins/say-what/say-what-cli.class.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/say-what/html/say-what-admin-list.php:3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/say-what/say-what-list-table.class.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/say-what/html/say-what-admin-addedit.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/say-what/say-what-list-table.class.php on line 4

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: translation, string, change

say-what/say-what.php Passed 13 tests

The main PHP script in "Say what?" version 2.1.6 is automatically included on every request by WordPress
114 characters long description:
An easy-to-use plugin that allows you to alter strings on your site without editing WordPress core, or plugin code

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin19,560 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JSON30018,603
PHP1099359712
JavaScript3627110
CSS119093
HTML10028
YAML10014

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity9.67
▷ Minimum class complexity4.00
▷ Maximum class complexity20.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods52
▷ Static methods00.00%
▷ Public methods4178.85%
▷ Protected methods47.69%
▷ Private methods713.46%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 1.26MB with 0.78MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
banner-772x250.png303.90KB124.74KB▼ 58.95%
screenshot-1.png59.54KB18.98KB▼ 68.12%
img/cpw.png882.77KB316.94KB▼ 64.10%
screenshot-2.png42.01KB12.50KB▼ 70.25%
img/logo.png0.87KB0.44KB▼ 49.55%