84% archive-control

Code Review | Archive Control

WordPress plugin Archive Control scored84%from 54 tests.

About plugin

  • Plugin page: archive-control
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 23, 2016
  • Latest release: Jan 19, 2023
  • Number of updates: 31
  • Update frequency: every 74.5 days
  • Top authors: TheJester12 (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active /17,714 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.28MB] [CPU: ▼13.83ms] Passed 4 tests

Server-side resources used by Archive Control
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2839.52 ▼3.16
Dashboard /wp-admin3.58 ▲0.2853.52 ▼3.08
Posts /wp-admin/edit.php3.69 ▲0.3452.28 ▼0.77
Add New Post /wp-admin/post-new.php6.16 ▲0.2888.39 ▼48.31
Media Library /wp-admin/upload.php3.50 ▲0.2742.22 ▲6.40
Archive Control /wp-admin/options-general.php?page=archive-control3.5041.07

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
archive_control_db_current_version

Browser metrics Passed 4 tests

Checking browser requirements for Archive Control
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.021.62 ▼0.0835.88 ▼8.49
Dashboard /wp-admin2,190 ▲135.53 ▼0.1484.81 ▼6.3241.96 ▼0.83
Posts /wp-admin/edit.php2,107 ▲41.99 ▼0.0239.26 ▲3.5537.25 ▲1.68
Add New Post /wp-admin/post-new.php1,539 ▲423.18 ▲5.09679.20 ▲38.9652.72 ▼14.39
Media Library /wp-admin/upload.php1,404 ▲74.27 ▲0.08100.95 ▼5.5340.60 ▼2.77
Archive Control /wp-admin/options-general.php?page=archive-control1,1263.0841.9665.35

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • archive_control_db_current_version
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/archive-control/db/update.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/archive-control/admin-sidebar.php:2

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 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
You can look at the official readme.txt

archive-control/archive-control.php Passed 13 tests

The main PHP script in "Archive Control" version 1.3.4 is automatically included on every request by WordPress
119 characters long description:
Customize custom post type archive titles, order, pagination, and add editable textareas above and below archive pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,589 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP51083541,350
JavaScript13016174
CSS10058
SVG1007

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.69
Average class complexity372.00
▷ Minimum class complexity372.00
▷ Maximum class complexity372.00
Average method complexity9.43
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods44
▷ Static methods1329.55%
▷ Public methods4397.73%
▷ Protected methods00.00%
▷ Private methods12.27%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin