78% wp-post-has-archive

Code Review | WP Post Has Archive

WordPress plugin WP Post Has Archive scored78%from 54 tests.

About plugin

  • Plugin page: wp-post-has-archive
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 11, 2019
  • Latest release: Jan 22, 2020
  • Number of updates: 12
  • Update frequency: every 8.6 days
  • Top authors: kanakogi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /544 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.73ms] Passed 4 tests

An overview of server-side resources used by WP Post Has Archive
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0739.40 ▲2.71
Dashboard /wp-admin3.38 ▲0.0746.04 ▲3.55
Posts /wp-admin/edit.php3.49 ▲0.1343.55 ▼5.59
Add New Post /wp-admin/post-new.php5.96 ▲0.0780.88 ▼19.29
Media Library /wp-admin/upload.php3.30 ▲0.0735.67 ▲3.25
Post has archive /wp-admin/options-general.php?page=post-has-archive3.3035.56

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Post Has Archive
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.021.70 ▲0.1343.64 ▲2.34
Dashboard /wp-admin2,196 ▲185.53 ▼0.1381.08 ▼44.4341.00 ▼3.36
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0533.74 ▼7.7433.30 ▼7.14
Add New Post /wp-admin/post-new.php1,529 ▲323.09 ▼0.45694.05 ▲45.9253.90 ▲0.47
Media Library /wp-admin/upload.php1,407 ▲74.26 ▲0.1094.30 ▼6.4244.30 ▲1.75
Post has archive /wp-admin/options-general.php?page=post-has-archive8072.0324.5526.37

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=post-has-archive
    • > Notice in wp-content/plugins/wp-post-has-archive/views/admin/setting.php+8
    Undefined variable: result

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Post_Has_Archive\\Controller' not found in wp-content/plugins/wp-post-has-archive/controllers/admin/setting.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Post_Has_Archive\\Util' not found in wp-content/plugins/wp-post-has-archive/classes/functions.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WP_Post_Has_Archive\\is_wp_error() in wp-content/plugins/wp-post-has-archive/views/admin/setting.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WP_Post_Has_Archive\\plugin_dir_path() in wp-content/plugins/wp-post-has-archive/wp-post-has-archive.php:20

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Requires at least: Version not formatted correctly
Please take inspiration from this readme.txt

wp-post-has-archive/wp-post-has-archive.php 92% from 13 tests

The principal PHP file in "WP Post Has Archive" v. 1.0.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected349 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP851136349

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods1754.84%
▷ Public methods2890.32%
▷ Protected methods39.68%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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