90% assign-staff-as-author-for-total

Code Review | Assign Staff as Author for Total

WordPress plugin Assign Staff as Author for Total scored90%from 54 tests.

About plugin

  • Plugin page: assign-staff-as-a...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Mar 29, 2020
  • Latest release: Nov 13, 2022
  • Number of updates: 9
  • Update frequency: every 107.6 days
  • Top authors: WPExplorer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /627 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.35ms] Passed 4 tests

A check of server-side resources used by Assign Staff as Author for Total
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0541.56 ▼0.78
Dashboard /wp-admin3.33 ▲0.0344.29 ▼4.12
Posts /wp-admin/edit.php3.38 ▲0.0346.32 ▲0.11
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.92 ▼0.62
Media Library /wp-admin/upload.php3.26 ▲0.0333.91 ▲0.43

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Assign Staff as Author for Total: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.26 ▼1.481.65 ▼0.4340.48 ▼3.26
Dashboard /wp-admin2,206 ▲154.85 ▼0.06107.15 ▲1.6341.66 ▼0.33
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0339.55 ▲3.1435.88 ▲1.78
Add New Post /wp-admin/post-new.php6,307 ▲4,77419.25 ▼3.89891.88 ▲208.1761.37 ▼14.26
Media Library /wp-admin/upload.php1,388 ▼04.28 ▲0.0795.10 ▼12.9441.51 ▼3.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: The official readme.txt is a good inspiration

assign-staff-as-author-for-total/assign-staff-as-author-for-total.php Passed 13 tests

The main file in "Assign Staff as Author for Total" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
136 characters long description:
Allows you to assign a staff member as the "author" for any public post to be displayed on the live site in the post meta or author bio.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected174 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP270107174

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected