78% genesis-author-pro

Code Review | Genesis Author Pro

WordPress plugin Genesis Author Pro scored78%from 54 tests.

About plugin

  • Plugin page: genesis-author-pro
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.3
  • WordPress version: 6.3.1
  • First release: Apr 16, 2015
  • Latest release: Aug 15, 2023
  • Number of updates: 21
  • Update frequency: every 145.3 days
  • Top authors: Nick_theGeek (47.62%)studiopress (28.57%)osompress (23.81%)nathanrice (14.29%)

Code review

54 tests

User reviews

9 reviews

Install metrics

3,000+ active /44,536 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.04ms] Passed 4 tests

A check of server-side resources used by Genesis Author Pro
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.57 ▼2.62
Dashboard /wp-admin3.36 ▲0.0256.25 ▼10.25
Posts /wp-admin/edit.php3.42 ▲0.0649.41 ▼3.52
Add New Post /wp-admin/post-new.php5.95 ▲0.0695.55 ▼10.36
Media Library /wp-admin/upload.php3.28 ▲0.0535.50 ▼4.04
Series /wp-admin/edit-tags.php?taxonomy=book-series&post_type=books3.2836.61
Add New Book /wp-admin/post-new.php?post_type=books3.4458.06
All Books /wp-admin/edit.php?post_type=books3.3341.00
Tags /wp-admin/edit-tags.php?taxonomy=book-tags&post_type=books3.2834.62
Authors /wp-admin/edit-tags.php?taxonomy=book-authors&post_type=books3.2835.69

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Genesis Author Pro
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.24 ▲0.081.63 ▼0.1246.11 ▼0.38
Dashboard /wp-admin2,234 ▲545.53 ▼0.1085.48 ▼8.5038.40 ▼3.23
Posts /wp-admin/edit.php2,139 ▲391.98 ▲0.0136.91 ▼2.3432.91 ▼3.78
Add New Post /wp-admin/post-new.php1,558 ▲3022.94 ▲0.03684.36 ▲30.0251.47 ▼6.72
Media Library /wp-admin/upload.php1,439 ▲394.23 ▲0.06100.70 ▼4.2947.28 ▲0.72
Series /wp-admin/edit-tags.php?taxonomy=book-series&post_type=books1,3122.1226.1731.24
Add New Book /wp-admin/post-new.php?post_type=books2,7477.97182.8670.68
All Books /wp-admin/edit.php?post_type=books1,1671.9729.7831.15
Tags /wp-admin/edit-tags.php?taxonomy=book-tags&post_type=books1,2882.1227.0030.49
Authors /wp-admin/edit-tags.php?taxonomy=book-authors&post_type=books1,3122.1229.2430.80

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
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
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/genesis-author-pro/plugin.php
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'GENESIS_AUTHOR_PRO_TEMPLATES_DIRarchive-books.php' (include_path='.:/usr/share/php') in wp-content/plugins/genesis-author-pro/templates/taxonomy-book-series.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/genesis-author-pro/templates/archive-books.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/genesis-author-pro/classes/class.Genesis_Author_Pro_Widget.php:7
    • > PHP Fatal error
      require_once(): Failed opening required 'GENESIS_AUTHOR_PRO_TEMPLATES_DIRarchive-books.php' (include_path='.:/usr/share/php') in wp-content/plugins/genesis-author-pro/templates/taxonomy-book-tags.php on line 11
    • > PHP Warning
      Use of undefined constant GENESIS_AUTHOR_PRO_TEMPLATES_DIR - assumed 'GENESIS_AUTHOR_PRO_TEMPLATES_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/genesis-author-pro/templates/taxonomy-book-authors.php on line 11
    • > PHP Warning
      Use of undefined constant GENESIS_AUTHOR_PRO_TEMPLATES_DIR - assumed 'GENESIS_AUTHOR_PRO_TEMPLATES_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/genesis-author-pro/templates/taxonomy-book-series.php on line 11
    • > PHP Warning
      require_once(GENESIS_AUTHOR_PRO_TEMPLATES_DIRarchive-books.php): failed to open stream: No such file or directory in wp-content/plugins/genesis-author-pro/templates/taxonomy-book-series.php on line 11
    • > PHP Warning
      Use of undefined constant GENESIS_AUTHOR_PRO_TEMPLATES_DIR - assumed 'GENESIS_AUTHOR_PRO_TEMPLATES_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/genesis-author-pro/templates/taxonomy-book-tags.php on line 11
    • > PHP Warning
      require_once(GENESIS_AUTHOR_PRO_TEMPLATES_DIRarchive-books.php): failed to open stream: No such file or directory in wp-content/plugins/genesis-author-pro/templates/taxonomy-book-tags.php on line 11
    • > PHP Warning
      require_once(GENESIS_AUTHOR_PRO_TEMPLATES_DIRarchive-books.php): failed to open stream: No such file or directory in wp-content/plugins/genesis-author-pro/templates/taxonomy-book-authors.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: genesis, authors, books

genesis-author-pro/plugin.php 92% from 13 tests

The principal PHP file in "Genesis Author Pro" v. 1.0.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("genesis-author-pro.php" instead of "plugin.php")

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
Good job! No executable or dangerous file extensions detected1,172 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP17454822985
CSS22910116
Markdown123071

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity8.11
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods52
▷ Static methods1630.77%
▷ Public methods4178.85%
▷ Protected methods00.00%
▷ Private methods1121.15%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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 were not PNG files found in your plugin