84% api-for-apex-towncontrol

Code Review | API for Apex TownControl

WordPress plugin API for Apex TownControl scored84%from 54 tests.

About plugin

  • Plugin page: api-for-apex-town...
  • Plugin version: 1.0.0
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 15, 2023
  • Latest release: Mar 15, 2023
  • Number of updates: 4
  • Update frequency: every 1.5 days
  • Top authors: iamnolanperry (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /366 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

A check of server-side resources used by API for Apex TownControl
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.79 ▲0.43
Dashboard /wp-admin3.37 ▲0.0752.47 ▼2.15
Posts /wp-admin/edit.php3.49 ▲0.1346.97 ▼6.43
Add New Post /wp-admin/post-new.php5.95 ▲0.0785.79 ▼26.53
Media Library /wp-admin/upload.php3.30 ▲0.0742.03 ▲3.46
towncontrol /wp-admin/options-general.php?page=towncontrol3.2634.91

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by API for Apex TownControl
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲14113.64 ▼0.7121.95 ▲20.2840.95 ▼4.65
Dashboard /wp-admin2,199 ▲225.57 ▼0.0085.01 ▼8.1538.73 ▼4.56
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0338.40 ▲2.0132.27 ▼1.87
Add New Post /wp-admin/post-new.php1,529 ▼123.57 ▲0.30736.96 ▲75.9755.36 ▲4.24
Media Library /wp-admin/upload.php1,404 ▲44.22 ▼0.11112.42 ▲3.6247.78 ▲0.61
towncontrol /wp-admin/options-general.php?page=towncontrol8472.0322.4628.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% 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 50% 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/api-for-apex-towncontrol/core/includes/classes/class-api-for-apex-towncontrol-options.php:122

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


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Option Screen), #2 (Demo Arrests Page)
You can look at the official readme.txt

api-for-apex-towncontrol/api-for-apex-towncontrol.php 92% from 13 tests

The primary PHP file in "API for Apex TownControl" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: A good plugin description is longer than 10 characters (currently 4 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin332 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.33
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
▷ Static methods13.33%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.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