93% sel-staff

Code Review | Sel Staff

WordPress plugin Sel Staff scored 93% from 54 tests.

About plugin

  • Plugin page: sel-staff
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 5.8.1
  • First release: Aug 9, 2017
  • Latest release: Aug 11, 2017
  • Number of updates: 8
  • Update frequency: every 0.3 days
  • Top authors: selthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 550 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.45MB] [CPU: ▼138.44ms] Passed 4 tests

Server-side resources used by Sel Staff
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.23 ▲0.5142.79 ▲15.54
Dashboard /wp-admin3.54 ▲0.4847.95 ▲0.87
Posts /wp-admin/edit.php3.59 ▲0.4850.73 ▲5.65
Add New Post /wp-admin/post-new.php5.83 ▲0.4091.92 ▼562.49
Media Library /wp-admin/upload.php3.42 ▲0.4237.74 ▲2.20
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.4830.39
Add New Staff /wp-admin/post-new.php?post_type=selt_staff3.5955.14
All Staff /wp-admin/edit.php?post_type=selt_staff3.5337.62
Group /wp-admin/edit-tags.php?taxonomy=selt_staff_group&post_type=selt_staff3.4234.43

Server storage [IO: ▲0.16MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Sel Staff
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲19116.42 ▲1.069.75 ▼1.7250.21 ▲1.95
Dashboard /wp-admin3,050 ▲1165.85 ▼0.07144.86 ▼4.20114.50 ▲6.86
Posts /wp-admin/edit.php2,832 ▲932.73 ▲0.0387.33 ▲20.7394.10 ▲6.69
Add New Post /wp-admin/post-new.php1,739 ▲6718.43 ▼0.33410.95 ▼32.09105.12 ▼8.51
Media Library /wp-admin/upload.php1,898 ▲915.06 ▼0.06151.70 ▲6.34127.51 ▲3.13
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,3202.1257.2881.52
Add New Staff /wp-admin/post-new.php?post_type=selt_staff3,1239.06230.29144.35
All Staff /wp-admin/edit.php?post_type=selt_staff1,5112.6566.2382.65
Group /wp-admin/edit-tags.php?taxonomy=selt_staff_group&post_type=selt_staff1,8292.4362.4885.43

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/sel-staff/inc/tgmpa/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/sel-staff/templates/taxonomy-selt_staff_group.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/sel-staff/inc/tgmpa/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/sel-staff/templates/single-selt_staff.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
1 plugin tags: staff

sel-staff/plugin.php 77% from 13 tests

This is the main PHP file of "Sel Staff" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: Name the main plugin file the same as the plugin slug ("sel-staff.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin2,209 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP116651,8582,209

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity48.14
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.27
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods101
▷ Static methods54.95%
▷ Public methods7877.23%
▷ Protected methods2322.77%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin