94% restricted-authors

Code Review | Restricted Authors - by iWriteCode

WordPress plugin Restricted Authors - by iWriteCode scored 94% from 54 tests.

About plugin

  • Plugin page: restricted-authors
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.6.0
  • WordPress version: 5.9.2
  • First release: Jul 5, 2019
  • Latest release: Dec 17, 2020
  • Number of updates: 6
  • Update frequency: every 88.5 days
  • Top authors: chrisakelley (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active / 3,099 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by Restricted Authors - by iWriteCode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0255.02 ▼0.36
Dashboard /wp-admin3.43 ▲0.0332.58 ▼0.02
Posts /wp-admin/edit.php3.66 ▲0.0236.94 ▼1.02
Add New Post /wp-admin/post-new.php6.89 ▼0.0890.68 ▼1,184.03
Media Library /wp-admin/upload.php3.31 ▲0.0124.04 ▲0.79

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 54 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Restricted Authors - by iWriteCode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲916.18 ▲0.405.62 ▼0.132.22 ▼0.22
Dashboard /wp-admin2,888 ▲306.08 ▼0.14119.08 ▼9.27155.57 ▼2.28
Posts /wp-admin/edit.php2,691 ▼33.37 ▲0.1464.36 ▼1.16140.09 ▼0.74
Add New Post /wp-admin/post-new.php1,773 ▲11221.82 ▲5.31417.45 ▼8.58160.46 ▲5.20
Media Library /wp-admin/upload.php1,698 ▲35.51 ▼0.02145.91 ▲6.55191.03 ▲9.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller 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
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/restricted-authors/includes/Views/profile-fields.php:3

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: restrict authors, multiple author, restrict default category, restrict category, author management

restricted-authors/restricted-authors.php 85% from 13 tests

The entry point to "Restricted Authors - by iWriteCode" version 1.1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin6,961 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21,2067924,847
PO File212312311,004
CSS3719618
Sass1240344
PHP260137148

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods11
▷ Static methods19.09%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin