90% staffer

Code Review | Staffer

WordPress plugin Staffer scored90%from 54 tests.

About plugin

  • Plugin page: staffer
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8.2
  • WordPress version: 6.3.1
  • First release: Sep 17, 2014
  • Latest release: Oct 1, 2017
  • Number of updates: 28
  • Update frequency: every 40.1 days
  • Top authors: cardiganmedia (71.43%)wpnook (32.14%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /26,130 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
Install script ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼2.18ms] Passed 4 tests

This is a short check of server-side resources used by Staffer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2139.87 ▲2.74
Dashboard /wp-admin3.51 ▲0.2146.51 ▲0.19
Posts /wp-admin/edit.php3.62 ▲0.2747.14 ▼5.99
Add New Post /wp-admin/post-new.php6.09 ▲0.2183.40 ▼5.67
Media Library /wp-admin/upload.php3.43 ▲0.2141.21 ▲2.80
Add New /wp-admin/post-new.php?post_type=staff3.5649.63
All Profiles /wp-admin/edit.php?post_type=staff3.4840.87
Departments /wp-admin/edit-tags.php?taxonomy=department&post_type=staff3.4333.79
Staffer Options /wp-admin/options-general.php?page=staffer3.4029.50

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Staffer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18213.57 ▼1.018.05 ▲6.3750.37 ▲12.58
Dashboard /wp-admin2,245 ▲574.83 ▼0.18106.61 ▲4.0041.20 ▲0.91
Posts /wp-admin/edit.php2,125 ▲332.04 ▲0.0135.50 ▼0.0832.38 ▲0.83
Add New Post /wp-admin/post-new.php1,546 ▲2723.54 ▲0.44679.93 ▲6.4655.30 ▲3.21
Media Library /wp-admin/upload.php1,430 ▲454.23 ▲0.02100.65 ▼6.8945.84 ▼1.33
Add New /wp-admin/post-new.php?post_type=staff2,5027.78175.8069.57
All Profiles /wp-admin/edit.php?post_type=staff1,0921.9533.7128.85
Departments /wp-admin/edit-tags.php?taxonomy=department&post_type=staff1,3042.1426.9626.91
Staffer Options /wp-admin/options-general.php?page=staffer8922.0626.1526.07

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • staffer
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: profile, business, staff directory, staff

staffer/load-staffer.php 92% from 13 tests

"Staffer" version 2.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("staffer.php" instead of "load-staffer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,245 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP11302553877
Sass3360240
JavaScript127093
SVG70034
CSS1001

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.30
Average class complexity12.38
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods40
▷ Static methods25.00%
▷ Public methods3587.50%
▷ Protected methods00.00%
▷ Private methods512.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin