79% chapters-for-authors

Code Review | Chapters for Authors

WordPress plugin Chapters for Authors scored79%from 54 tests.

About plugin

  • Plugin page: chapters-for-authors
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1
  • WordPress version: 6.3.1
  • First release: Sep 27, 2016
  • Latest release: Apr 7, 2019
  • Number of updates: 6
  • Update frequency: every 153.7 days
  • Top authors: deviodigital (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /2,639 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.03ms] Passed 4 tests

Server-side resources used by Chapters for Authors
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0742.98 ▼1.42
Dashboard /wp-admin3.36 ▲0.0550.64 ▼2.22
Posts /wp-admin/edit.php3.42 ▲0.0653.06 ▲1.65
Add New Post /wp-admin/post-new.php6.12 ▲0.2394.02 ▼10.14
Media Library /wp-admin/upload.php3.28 ▲0.0539.21 ▲4.17
All Chapters /wp-admin/edit.php?post_type=chapters_for_authors3.3338.73
Books /wp-admin/edit-tags.php?taxonomy=books&post_type=chapters_for_authors3.2736.60
Add Chapter /wp-admin/post-new.php?post_type=chapters_for_authors6.1186.36
Characters /wp-admin/edit-tags.php?taxonomy=characters&post_type=chapters_for_authors3.2736.41

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Chapters for Authors: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲17813.42 ▼0.969.67 ▲7.9546.83 ▲4.80
Dashboard /wp-admin2,234 ▲635.53 ▼0.0782.15 ▼6.8139.87 ▲1.69
Posts /wp-admin/edit.php2,139 ▲392.01 ▼0.0234.56 ▼2.2935.61 ▼0.08
Add New Post /wp-admin/post-new.php1,559 ▲2823.39 ▲0.19668.00 ▲1.1962.92 ▲14.85
Media Library /wp-admin/upload.php1,442 ▲394.16 ▼0.0799.63 ▲1.4546.71 ▲4.73
All Chapters /wp-admin/edit.php?post_type=chapters_for_authors1,1361.9933.8229.86
Books /wp-admin/edit-tags.php?taxonomy=books&post_type=chapters_for_authors1,3102.1726.6031.03
Add Chapter /wp-admin/post-new.php?post_type=chapters_for_authors6,23119.86829.5334.44
Characters /wp-admin/edit-tags.php?taxonomy=characters&post_type=chapters_for_authors1,2882.1527.6332.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/chapters-for-authors/public/partials/chapters-for-authors-public-display.php
    • > /wp-content/plugins/chapters-for-authors/admin/partials/chapters-for-authors-admin-display.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chapters-for-authors/admin/class-chapters-for-authors-custom-post-type.php:86
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chapters-for-authors/admin/class-chapters-for-authors-taxonomies.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chapters-for-authors/admin/class-chapters-for-authors-metaboxes.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: chapters, writers, authors, books

chapters-for-authors/chapters-for-authors.php Passed 13 tests

This is the main PHP file of "Chapters for Authors" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
66 characters long description:
Write your next book from the comfort of your WordPress dashboard.

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
Good job! No executable or dangerous file extensions detected360 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP15149613350
JavaScript24546
Markdown1304
CSS2080

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity1.29
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.09
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.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
No PNG files were detected