84% tsp-authors-note

Code Review | LAPDI Authors Note

WordPress plugin LAPDI Authors Note scored84%from 54 tests.

About plugin

  • Plugin page: tsp-authors-note
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.6.1
  • WordPress version: 6.3.1
  • First release: Sep 7, 2013
  • Latest release: Feb 8, 2021
  • Number of updates: 13
  • Update frequency: every 208.7 days
  • Top authors: sharrondenice (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,694 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 gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.94ms] Passed 4 tests

A check of server-side resources used by LAPDI Authors Note
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.24 ▼1.17
Dashboard /wp-admin3.31 ▲0.0147.06 ▼6.96
Posts /wp-admin/edit.php3.36 ▲0.0047.32 ▼0.04
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.82 ▲7.31
Media Library /wp-admin/upload.php3.24 ▲0.0036.18 ▼3.58

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

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

Browser metrics Passed 4 tests

A check of browser resources used by LAPDI Authors Note
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.50 ▼0.884.82 ▲2.9043.54 ▲0.24
Dashboard /wp-admin2,206 ▲185.91 ▲0.0698.36 ▼18.3238.69 ▼3.49
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0338.98 ▲3.4935.18 ▲1.35
Add New Post /wp-admin/post-new.php1,547 ▲3318.32 ▲0.88602.36 ▼105.2374.66 ▲22.82
Media Library /wp-admin/upload.php1,391 ▲64.22 ▲0.0394.96 ▼16.4840.83 ▼7.27

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

Smoke tests 75% 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 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
Almost there! Just fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'TSP_Easy_Dev_Options' not found in wp-content/plugins/tsp-authors-note/TSP_Easy_Dev.extend.php:12
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/tsp-authors-note/tsp-authors-note.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/tsp-authors-note/TSP_Easy_Dev.config.php:18
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/tsp-authors-note/tsp-authors-note.php on line 14
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/tsp-authors-note/tsp-authors-note.php on line 14

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 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: the software people, after-thought, afterword, note, author

tsp-authors-note/tsp-authors-note.php 85% from 13 tests

This is the main PHP file of "LAPDI Authors Note" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 212 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin434 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP36398278
CSS16082
Smarty10044
Markdown113030

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity11.50
▷ Minimum class complexity4.00
▷ Maximum class complexity19.00
Average method complexity5.20
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants12
▷ Global constants12100.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
3 PNG files occupy 0.20MB with 0.19MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/yim.png59.95KB2.65KB▼ 95.57%
assets/images/jabber.png77.34KB4.12KB▼ 94.68%
assets/images/aim.png64.72KB3.87KB▼ 94.02%