72% elderlawanswers-content-terminal

Code Review | ElderLawAnswers Content Terminal

WordPress plugin ElderLawAnswers Content Terminal scored72%from 54 tests.

About plugin

  • Plugin page: elderlawanswers-c...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 3, 2021
  • Latest release: Aug 9, 2023
  • Number of updates: 10
  • Update frequency: every 89.0 days
  • Top authors: ElderLawAnswers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /744 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.02MB] [CPU: ▼4.31ms] Passed 4 tests

A check of server-side resources used by ElderLawAnswers Content Terminal
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0244.41 ▲2.31
Dashboard /wp-admin3.33 ▲0.0249.96 ▼6.36
Posts /wp-admin/edit.php3.38 ▲0.0246.37 ▼2.03
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.10 ▼11.17
Media Library /wp-admin/upload.php3.25 ▲0.0238.88 ▲3.28
Sub Level Menu /wp-admin/admin.php?page=myplugin/myplugin-admin-sub-page.php3.1934.03

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by ElderLawAnswers Content Terminal
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.38 ▼0.011.84 ▼0.0143.64 ▼0.07
Dashboard /wp-admin2,209 ▲355.61 ▲0.0187.47 ▼20.1441.03 ▼2.26
Posts /wp-admin/edit.php2,120 ▲172.03 ▲0.0237.31 ▲1.4635.74 ▲2.18
Add New Post /wp-admin/post-new.php1,543 ▲1223.06 ▼0.18677.24 ▲2.0859.64 ▲6.44
Media Library /wp-admin/upload.php1,420 ▲204.22 ▲0.02111.30 ▲4.0848.49 ▼0.56
Sub Level Menu /wp-admin/admin.php?page=myplugin/myplugin-admin-sub-page.php7932.1829.6025.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=myplugin/myplugin-admin-sub-page.php
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'myplguin_admin_sub_page' not found or invalid function name

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/elderlawanswers-content-terminal/public/partials/ela-content-terminal-public-display.php
    • > /wp-content/plugins/elderlawanswers-content-terminal/admin/partials/plugin-ela-content-terminal-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/elderlawanswers-content-terminal/admin/templates/index.php:13

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 errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: "Attorney.ElderLawAnswers.com"
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt is a good inspiration

elderlawanswers-content-terminal/elderlawanswers-content-terminal.php 92% from 13 tests

The main PHP script in "ElderLawAnswers Content Terminal" version 1.0.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 161 characters long)

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
Success! There were no dangerous files found in this plugin519 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP13138539479
JavaScript2105439
CSS3081

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.57
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3183.78%
▷ Protected methods00.00%
▷ Private methods616.22%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected