79% wp-publication-archive

Code Review | WP Publication Archive

WordPress plugin WP Publication Archive scored 79% from 54 tests.

About plugin

  • Plugin page: wp-publication-ar...
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.6
  • WordPress version: 6.3.1
  • First release: Jan 1, 2011
  • Latest release: Jul 25, 2013
  • Number of updates: 56
  • Update frequency: every 17.1 days
  • Top authors: ericmann (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

800+ active / 37,136 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼9.88ms] Passed 4 tests

An overview of server-side resources used by WP Publication Archive
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.89 ▲0.05
Dashboard /wp-admin3.37 ▲0.0746.53 ▼0.42
Posts /wp-admin/edit.php3.49 ▲0.1452.46 ▼8.59
Add New Post /wp-admin/post-new.php5.95 ▲0.0784.59 ▼24.78
Media Library /wp-admin/upload.php3.29 ▲0.0736.34 ▼5.73
Authors /wp-admin/edit-tags.php?taxonomy=publication-author&post_type=publication3.2932.54
Publications /wp-admin/edit.php?post_type=publication3.3538.11
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=publication3.2935.43
Add New /wp-admin/post-new.php?post_type=publication3.4352.10
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=publication3.2946.13

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 11 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_wp_publication_archive_widget
can_compress_scripts
db_upgraded
widget_wp_publication_archive_cat_count_widget
category_children
wp-publication-archive-core
widget_theysaidso_widget
widget_recent-posts
...

Browser metrics Passed 4 tests

WP Publication Archive: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9113.70 ▼0.671.90 ▲0.0544.02 ▲5.22
Dashboard /wp-admin2,236 ▲775.81 ▼0.07108.41 ▼137.4668.18 ▼5.87
Posts /wp-admin/edit.php2,136 ▲442.22 ▲0.1742.26 ▼6.0836.73 ▼2.15
Add New Post /wp-admin/post-new.php1,555 ▲2123.13 ▼0.03777.26 ▼31.7437.31 ▼20.69
Media Library /wp-admin/upload.php1,422 ▲374.26 ▲0.07101.92 ▼42.1269.38 ▲19.05
Authors /wp-admin/edit-tags.php?taxonomy=publication-author&post_type=publication1,2782.3231.4631.29
Publications /wp-admin/edit.php?post_type=publication1,1522.1537.4032.74
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=publication1,3512.2629.5532.70
Add New /wp-admin/post-new.php?post_type=publication2,6127.91188.64124.64
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=publication1,4872.2733.2739.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 11 options
    • widget_theysaidso_widget
    • widget_wp_publication_archive_category_widget
    • category_children
    • db_upgraded
    • widget_wp_publication_archive_cat_count_widget
    • can_compress_scripts
    • widget_wp_publication_archive_widget
    • widget_recent-posts
    • wp-publication-archive-core
    • theysaidso_admin_options
    • ...

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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-publication-archive/includes/template.wppa_publication_list.php
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: publications in wp-content/plugins/wp-publication-archive/includes/template.wppa_publication_list.php on line 25
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/wp-publication-archive/includes/template.wppa_publication_dropdown.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-publication-archive/lib/class.wp-publication-archive-category-widget.php:15
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/wp-publication-archive/includes/template.wppa_publication_list.php on line 22
    • > PHP Notice
      Undefined variable: limit in wp-content/plugins/wp-publication-archive/includes/template.wppa_publication_list.php on line 38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-publication-archive/wp-publication-archive.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-publication-archive/includes/template.wppa_publication_dropdown.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-publication-archive/lib/class.wp-publication-archive-utilities.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-publication-archive/lib/class.wp-publication-archive-cat-count-widget.php:15
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/wp-publication-archive/includes/template.wppa_widget.php:14

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: doc, document management, pdf, archive

wp-publication-archive/wp-publication-archive.php Passed 13 tests

"WP Publication Archive" version 3.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
123 characters long description:
Allows users to upload, manage, search, and download publications, documents, and similar content (PDF, Power-Point, etc.).

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
There were no executable files found in this plugin1,924 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP133979051,619
PO File2113134264
CSS18041

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity29.14
▷ Minimum class complexity2.00
▷ Maximum class complexity111.00
Average method complexity3.66
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods74
▷ Static methods3040.54%
▷ Public methods7195.95%
▷ Protected methods34.05%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
10 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/image.png4.25KB1.42KB▼ 66.63%
images/icons/unknown.png3.08KB0.48KB▼ 84.40%
images/icons/data.png3.67KB1.00KB▼ 72.72%
images/icons/broken.png3.84KB1.07KB▼ 72.16%
images/icons/zip.png4.00KB1.44KB▼ 63.94%