79% academa

Code Review | Academa

WordPress plugin Academa scored 79% from 54 tests.

About plugin

  • Plugin page: academa
  • Plugin version: 0.1
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7
  • WordPress version: 5.8.1
  • First release: Jul 24, 2018
  • Latest release: Jul 24, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: ankitgupta2801 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 404 total downloads


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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼161.37ms] Passed 4 tests

Analyzing server-side resources used by Academa
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0335.00 ▼0.26
Dashboard /wp-admin3.08 ▲0.0345.70 ▼2.58
Posts /wp-admin/edit.php3.13 ▲0.0349.06 ▲3.37
Add New Post /wp-admin/post-new.php5.44 ▲0.0190.48 ▼643.19
Media Library /wp-admin/upload.php3.02 ▲0.0234.48 ▲0.55
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=publication3.0232.02
All Publications /wp-admin/edit.php?post_type=publication3.0741.09
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=publication3.0241.61
Add New /wp-admin/post-new.php?post_type=publication3.2452.13

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Academa
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,899 ▲32716.72 ▲1.0827.56 ▲14.6846.18 ▼6.38
Dashboard /wp-admin3,020 ▲865.93 ▼0.03138.38 ▼10.76119.39 ▼1.73
Posts /wp-admin/edit.php2,786 ▲472.71 ▼0.0066.23 ▼6.4497.18 ▲3.53
Add New Post /wp-admin/post-new.php1,529 ▲2918.85 ▲0.08401.92 ▼3.75117.35 ▲2.24
Media Library /wp-admin/upload.php1,854 ▲475.02 ▼0.00146.95 ▼7.22127.27 ▲1.91
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=publication1,8732.5264.2078.26
All Publications /wp-admin/edit.php?post_type=publication1,5072.6364.9783.65
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=publication1,9572.4164.8996.20
Add New /wp-admin/post-new.php?post_type=publication2,2753.5194.34105.60

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • category_children

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/academa/academa.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/academa/templates/archive-publication.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/academa/templates/single-publication.php:6

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)
Everything seems fine, but this is not an exhaustive test


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: bibtex, academic

academa/academa.php Passed 13 tests

Analyzing the main PHP file in "Academa" version 0.1
86 characters long description:
Custom post types targetted towards showing an academic profile on a Wordpress website

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 plugin3,503 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions8100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon-256x256.png12.30KB11.45KB▼ 6.91%
icon-128x128.png4.68KB4.45KB▼ 4.92%